MooTools.More={'version':'1.2.3.1'};Element.implement({isDisplayed:function(){return this.getStyle('display')!='none'},toggle:function(){return this[this.isDisplayed()?'hide':'show']()},hide:function(){var d;try{if('none'!=this.getStyle('display'))d=this.getStyle('display')}catch(e){}return this.store('originalDisplay',d||'block').setStyle('display','none')},show:function(display){return this.setStyle('display',display||this.retrieve('originalDisplay')||'block')},swapClass:function(remove,add){return this.removeClass(remove).addClass(add)}});Fx.Elements=new Class({Extends:Fx.CSS,initialize:function(elements,options){this.elements=this.subject=$$(elements);this.parent(options)},compute:function(from,to,delta){var now={};for(var i in from){var iFrom=from[i],iTo=to[i],iNow=now[i]={};for(var p in iFrom)iNow[p]=this.parent(iFrom[p],iTo[p],delta)}return now},set:function(now){for(var i in now){var iNow=now[i];for(var p in iNow)this.render(this.elements[i],p,iNow[p],this.options.unit)}return this},start:function(obj){if(!this.check(obj))return this;var from={},to={};for(var i in obj){var iProps=obj[i],iFrom=from[i]={},iTo=to[i]={};for(var p in iProps){var parsed=this.prepare(this.elements[i],p,iProps[p]);iFrom[p]=parsed.from;iTo[p]=parsed.to}}return this.parent(from,to)}});var Accordion=Fx.Accordion=new Class({Extends:Fx.Elements,options:{display:0,show:false,height:true,width:false,opacity:true,fixedHeight:false,fixedWidth:false,wait:false,alwaysHide:false,trigger:'click',initialDisplayFx:true},initialize:function(){var params=Array.link(arguments,{'container':Element.type,'options':Object.type,'togglers':$defined,'elements':$defined});this.parent(params.elements,params.options);this.togglers=$$(params.togglers);this.container=document.id(params.container);this.previous=-1;if(this.options.alwaysHide)this.options.wait=true;if($chk(this.options.show)){this.options.display=false;this.previous=this.options.show}if(this.options.start){this.options.display=false;this.options.show=false}this.effects={};if(this.options.opacity)this.effects.opacity='fullOpacity';if(this.options.width)this.effects.width=this.options.fixedWidth?'fullWidth':'offsetWidth';if(this.options.height)this.effects.height=this.options.fixedHeight?'fullHeight':'scrollHeight';for(var i=0,l=this.togglers.length;i<l;i++)this.addSection(this.togglers[i],this.elements[i]);this.elements.each(function(el,i){if(this.options.show===i){this.fireEvent('active',[this.togglers[i],el])}else{for(var fx in this.effects)el.setStyle(fx,0)}},this);if($chk(this.options.display))this.display(this.options.display,this.options.initialDisplayFx)},addSection:function(toggler,element){toggler=document.id(toggler);element=document.id(element);var test=this.togglers.contains(toggler);this.togglers.include(toggler);this.elements.include(element);var idx=this.togglers.indexOf(toggler);toggler.addEvent(this.options.trigger,this.display.bind(this,idx));if(this.options.height)element.setStyles({'padding-top':0,'border-top':'none','padding-bottom':0,'border-bottom':'none'});if(this.options.width)element.setStyles({'padding-left':0,'border-left':'none','padding-right':0,'border-right':'none'});element.fullOpacity=1;if(this.options.fixedWidth)element.fullWidth=this.options.fixedWidth;if(this.options.fixedHeight)element.fullHeight=this.options.fixedHeight;element.setStyle('overflow','hidden');if(!test){for(var fx in this.effects)element.setStyle(fx,0)}return this},display:function(index,useFx){useFx=$pick(useFx,true);index=($type(index)=='element')?this.elements.indexOf(index):index;if((this.timer&&this.options.wait)||(index===this.previous&&!this.options.alwaysHide))return this;this.previous=index;var obj={};this.elements.each(function(el,i){obj[i]={};var hide=(i!=index)||(this.options.alwaysHide&&(el.offsetHeight>0));this.fireEvent(hide?'background':'active',[this.togglers[i],el]);for(var fx in this.effects)obj[i][fx]=hide?0:el[this.effects[fx]]},this);return useFx?this.start(obj):this.set(obj)}});Fx.Scroll=new Class({Extends:Fx,options:{offset:{x:0,y:0},wheelStops:true},initialize:function(element,options){this.element=this.subject=document.id(element);this.parent(options);var cancel=this.cancel.bind(this,false);if($type(this.element)!='element')this.element=document.id(this.element.getDocument().body);var stopper=this.element;if(this.options.wheelStops){this.addEvent('start',function(){stopper.addEvent('mousewheel',cancel)},true);this.addEvent('complete',function(){stopper.removeEvent('mousewheel',cancel)},true)}},set:function(){var now=Array.flatten(arguments);this.element.scrollTo(now[0],now[1])},compute:function(from,to,delta){return[0,1].map(function(i){return Fx.compute(from[i],to[i],delta)})},start:function(x,y){if(!this.check(x,y))return this;var offsetSize=this.element.getSize(),scrollSize=this.element.getScrollSize();var scroll=this.element.getScroll(),values={x:x,y:y};for(var z in values){var max=scrollSize[z]-offsetSize[z];if($chk(values[z]))values[z]=($type(values[z])=='number')?values[z].limit(0,max):max;else values[z]=scroll[z];values[z]+=this.options.offset[z]}return this.parent([scroll.x,scroll.y],[values.x,values.y])},toTop:function(){return this.start(false,0)},toLeft:function(){return this.start(0,false)},toRight:function(){return this.start('right',false)},toBottom:function(){return this.start(false,'bottom')},toElement:function(el){var position=document.id(el).getPosition(this.element);return this.start(position.x,position.y)},scrollIntoView:function(el,axes,offset){axes=axes?$splat(axes):['x','y'];var to={};el=document.id(el);var pos=el.getPosition(this.element);var size=el.getSize();var scroll=this.element.getScroll();var containerSize=this.element.getSize();var edge={x:pos.x+size.x,y:pos.y+size.y};['x','y'].each(function(axis){if(axes.contains(axis)){if(edge[axis]>scroll[axis]+containerSize[axis])to[axis]=edge[axis]-containerSize[axis];if(pos[axis]<scroll[axis])to[axis]=pos[axis]}if(to[axis]==null)to[axis]=scroll[axis];if(offset&&offset[axis])to[axis]=to[axis]+offset[axis]},this);if(to.x!=scroll.x||to.y!=scroll.y)this.start(to.x,to.y);return this}});Fx.Slide=new Class({Extends:Fx,options:{mode:'vertical'},initialize:function(element,options){this.addEvent('complete',function(){this.open=(this.wrapper['offset'+this.layout.capitalize()]!=0);if(this.open&&Browser.Engine.webkit419)this.element.dispose().inject(this.wrapper)},true);this.element=this.subject=document.id(element);this.parent(options);var wrapper=this.element.retrieve('wrapper');this.wrapper=wrapper||new Element('div',{styles:$extend(this.element.getStyles('margin','position'),{overflow:'hidden'})}).wraps(this.element);this.element.store('wrapper',this.wrapper).setStyle('margin',0);this.now=[];this.open=true},vertical:function(){this.margin='margin-top';this.layout='height';this.offset=this.element.offsetHeight},horizontal:function(){this.margin='margin-left';this.layout='width';this.offset=this.element.offsetWidth},set:function(now){this.element.setStyle(this.margin,now[0]);this.wrapper.setStyle(this.layout,now[1]);return this},compute:function(from,to,delta){return[0,1].map(function(i){return Fx.compute(from[i],to[i],delta)})},start:function(how,mode){if(!this.check(how,mode))return this;this[mode||this.options.mode]();var margin=this.element.getStyle(this.margin).toInt();var layout=this.wrapper.getStyle(this.layout).toInt();var caseIn=[[margin,layout],[0,this.offset]];var caseOut=[[margin,layout],[-this.offset,0]];var start;switch(how){case'in':start=caseIn;break;case'out':start=caseOut;break;case'toggle':start=(layout==0)?caseIn:caseOut}return this.parent(start[0],start[1])},slideIn:function(mode){return this.start('in',mode)},slideOut:function(mode){return this.start('out',mode)},hide:function(mode){this[mode||this.options.mode]();this.open=false;return this.set([-this.offset,0])},show:function(mode){this[mode||this.options.mode]();this.open=true;return this.set([0,this.offset])},toggle:function(mode){return this.start('toggle',mode)}});Element.Properties.slide={set:function(options){var slide=this.retrieve('slide');if(slide)slide.cancel();return this.eliminate('slide').store('slide:options',$extend({link:'cancel'},options))},get:function(options){if(options||!this.retrieve('slide')){if(options||!this.retrieve('slide:options'))this.set('slide',options);this.store('slide',new Fx.Slide(this,this.retrieve('slide:options')))}return this.retrieve('slide')}};Element.implement({slide:function(how,mode){how=how||'toggle';var slide=this.get('slide'),toggle;switch(how){case'hide':slide.hide(mode);break;case'show':slide.show(mode);break;case'toggle':var flag=this.retrieve('slide:flag',slide.open);slide[flag?'slideOut':'slideIn'](mode);this.store('slide:flag',!flag);toggle=true;break;default:slide.start(how,mode)}if(!toggle)this.eliminate('slide:flag');return this}});var SmoothScroll=Fx.SmoothScroll=new Class({Extends:Fx.Scroll,initialize:function(options,context){context=context||document;this.doc=context.getDocument();var win=context.getWindow();this.parent(this.doc,options);this.links=this.options.links?$$(this.options.links):$$(this.doc.links);var location=win.location.href.match(/^[^#]*/)[0]+'#';this.links.each(function(link){if(link.href.indexOf(location)!=0){return}var anchor=link.href.substr(location.length);if(anchor)this.useLink(link,anchor)},this);if(!Browser.Engine.webkit419){this.addEvent('complete',function(){win.location.hash=this.anchor},true)}},useLink:function(link,anchor){var el;link.addEvent('click',function(event){if(el!==false&&!el)el=document.id(anchor)||this.doc.getElement('a[name='+anchor+']');if(el){event.preventDefault();this.anchor=anchor;this.toElement(el);link.blur()}}.bind(this))}});var Drag=new Class({Implements:[Events,Options],options:{snap:6,unit:'px',grid:false,style:true,limit:false,handle:false,invert:false,preventDefault:false,modifiers:{x:'left',y:'top'}},initialize:function(){var params=Array.link(arguments,{'options':Object.type,'element':$defined});this.element=document.id(params.element);this.document=this.element.getDocument();this.setOptions(params.options||{});var htype=$type(this.options.handle);this.handles=((htype=='array'||htype=='collection')?$$(this.options.handle):document.id(this.options.handle))||this.element;this.mouse={'now':{},'pos':{}};this.value={'start':{},'now':{}};this.selection=(Browser.Engine.trident)?'selectstart':'mousedown';this.bound={start:this.start.bind(this),check:this.check.bind(this),drag:this.drag.bind(this),stop:this.stop.bind(this),cancel:this.cancel.bind(this),eventStop:$lambda(false)};this.attach()},attach:function(){this.handles.addEvent('mousedown',this.bound.start);return this},detach:function(){this.handles.removeEvent('mousedown',this.bound.start);return this},start:function(event){if(this.options.preventDefault)event.preventDefault();this.mouse.start=event.page;this.fireEvent('beforeStart',this.element);var limit=this.options.limit;this.limit={x:[],y:[]};for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;if(this.options.style)this.value.now[z]=this.element.getStyle(this.options.modifiers[z]).toInt();else this.value.now[z]=this.element[this.options.modifiers[z]];if(this.options.invert)this.value.now[z]*=-1;this.mouse.pos[z]=event.page[z]-this.value.now[z];if(limit&&limit[z]){for(var i=2;i--;i){if($chk(limit[z][i]))this.limit[z][i]=$lambda(limit[z][i])()}}}if($type(this.options.grid)=='number')this.options.grid={x:this.options.grid,y:this.options.grid};this.document.addEvents({mousemove:this.bound.check,mouseup:this.bound.cancel});this.document.addEvent(this.selection,this.bound.eventStop)},check:function(event){if(this.options.preventDefault)event.preventDefault();var distance=Math.round(Math.sqrt(Math.pow(event.page.x-this.mouse.start.x,2)+Math.pow(event.page.y-this.mouse.start.y,2)));if(distance>this.options.snap){this.cancel();this.document.addEvents({mousemove:this.bound.drag,mouseup:this.bound.stop});this.fireEvent('start',[this.element,event]).fireEvent('snap',this.element)}},drag:function(event){if(this.options.preventDefault)event.preventDefault();this.mouse.now=event.page;for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;this.value.now[z]=this.mouse.now[z]-this.mouse.pos[z];if(this.options.invert)this.value.now[z]*=-1;if(this.options.limit&&this.limit[z]){if($chk(this.limit[z][1])&&(this.value.now[z]>this.limit[z][1])){this.value.now[z]=this.limit[z][1]}else if($chk(this.limit[z][0])&&(this.value.now[z]<this.limit[z][0])){this.value.now[z]=this.limit[z][0]}}if(this.options.grid[z])this.value.now[z]-=((this.value.now[z]-(this.limit[z][0]||0))%this.options.grid[z]);if(this.options.style)this.element.setStyle(this.options.modifiers[z],this.value.now[z]+this.options.unit);else this.element[this.options.modifiers[z]]=this.value.now[z]}this.fireEvent('drag',[this.element,event])},cancel:function(event){this.document.removeEvent('mousemove',this.bound.check);this.document.removeEvent('mouseup',this.bound.cancel);if(event){this.document.removeEvent(this.selection,this.bound.eventStop);this.fireEvent('cancel',this.element)}},stop:function(event){this.document.removeEvent(this.selection,this.bound.eventStop);this.document.removeEvent('mousemove',this.bound.drag);this.document.removeEvent('mouseup',this.bound.stop);if(event)this.fireEvent('complete',[this.element,event])}});Element.implement({makeResizable:function(options){var drag=new Drag(this,$merge({modifiers:{x:'width',y:'height'}},options));this.store('resizer',drag);return drag.addEvent('drag',function(){this.fireEvent('resize',drag)}.bind(this))}});Drag.Move=new Class({Extends:Drag,options:{droppables:[],container:false,precalculate:false,includeMargins:true,checkDroppables:true},initialize:function(element,options){this.parent(element,options);this.droppables=$$(this.options.droppables);this.container=document.id(this.options.container);if(this.container&&$type(this.container)!='element')this.container=document.id(this.container.getDocument().body);var position=this.element.getStyle('position');if(position=='static')position='absolute';if([this.element.getStyle('left'),this.element.getStyle('top')].contains('auto'))this.element.position(this.element.getPosition(this.element.offsetParent));this.element.setStyle('position',position);this.addEvent('start',this.checkDroppables,true);this.overed=null},start:function(event){if(this.container){var ccoo=this.container.getCoordinates(this.element.getOffsetParent()),cbs={},ems={};['top','right','bottom','left'].each(function(pad){cbs[pad]=this.container.getStyle('border-'+pad).toInt();ems[pad]=this.element.getStyle('margin-'+pad).toInt()},this);var width=this.element.offsetWidth+ems.left+ems.right;var height=this.element.offsetHeight+ems.top+ems.bottom;if(this.options.includeMargins){$each(ems,function(value,key){ems[key]=0})}if(this.container==this.element.getOffsetParent()){this.options.limit={x:[0-ems.left,ccoo.right-cbs.left-cbs.right-width+ems.right],y:[0-ems.top,ccoo.bottom-cbs.top-cbs.bottom-height+ems.bottom]}}else{this.options.limit={x:[ccoo.left+cbs.left-ems.left,ccoo.right-cbs.right-width+ems.right],y:[ccoo.top+cbs.top-ems.top,ccoo.bottom-cbs.bottom-height+ems.bottom]}}}if(this.options.precalculate){this.positions=this.droppables.map(function(el){return el.getCoordinates()})}this.parent(event)},checkAgainst:function(el,i){el=(this.positions)?this.positions[i]:el.getCoordinates();var now=this.mouse.now;return(now.x>el.left&&now.x<el.right&&now.y<el.bottom&&now.y>el.top)},checkDroppables:function(){var overed=this.droppables.filter(this.checkAgainst,this).getLast();if(this.overed!=overed){if(this.overed)this.fireEvent('leave',[this.element,this.overed]);if(overed)this.fireEvent('enter',[this.element,overed]);this.overed=overed}},drag:function(event){this.parent(event);if(this.options.checkDroppables&&this.droppables.length)this.checkDroppables()},stop:function(event){this.checkDroppables();this.fireEvent('drop',[this.element,this.overed,event]);this.overed=null;return this.parent(event)}});Element.implement({makeDraggable:function(options){var drag=new Drag.Move(this,options);this.store('dragger',drag);return drag}});var Tips=new Class({Implements:[Events,Options],options:{onShow:function(tip){tip.setStyle('visibility','visible')},onHide:function(tip){tip.setStyle('visibility','hidden')},title:'title',text:function(el){return el.get('rel')||el.get('href')},showDelay:100,hideDelay:100,className:null,offset:{x:16,y:16},fixed:false},initialize:function(){var params=Array.link(arguments,{options:Object.type,elements:$defined});if(params.options&&params.options.offsets)params.options.offset=params.options.offsets;this.setOptions(params.options);this.container=new Element('div',{'class':'tip'});this.tip=this.getTip();if(params.elements)this.attach(params.elements)},getTip:function(){return new Element('div',{'class':this.options.className,styles:{visibility:'hidden',display:'none',position:'absolute',top:0,left:0}}).adopt(new Element('div',{'class':'tip-top'}),this.container,new Element('div',{'class':'tip-bottom'})).inject(document.body)},attach:function(elements){var read=function(option,element){if(option==null)return'';return $type(option)=='function'?option(element):element.get(option)};$$(elements).each(function(element){var title=read(this.options.title,element);element.erase('title').store('tip:native',title).retrieve('tip:title',title);element.retrieve('tip:text',read(this.options.text,element));var events=['enter','leave'];if(!this.options.fixed)events.push('move');events.each(function(value){element.addEvent('mouse'+value,element.retrieve('tip:'+value,this['element'+value.capitalize()].bindWithEvent(this,element)))},this)},this);return this},detach:function(elements){$$(elements).each(function(element){['enter','leave','move'].each(function(value){element.removeEvent('mouse'+value,element.retrieve('tip:'+value)||$empty)});element.eliminate('tip:enter').eliminate('tip:leave').eliminate('tip:move');if($type(this.options.title)=='string'&&this.options.title=='title'){var original=element.retrieve('tip:native');if(original)element.set('title',original)}},this);return this},elementEnter:function(event,element){$A(this.container.childNodes).each(Element.dispose);['title','text'].each(function(value){var content=element.retrieve('tip:'+value);if(!content)return;this[value+'Element']=new Element('div',{'class':'tip-'+value}).inject(this.container);this.fill(this[value+'Element'],content)},this);this.timer=$clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this,element);this.tip.setStyle('display','block');this.position((!this.options.fixed)?event:{page:element.getPosition()})},elementLeave:function(event,element){$clear(this.timer);this.tip.setStyle('display','none');this.timer=this.hide.delay(this.options.hideDelay,this,element)},elementMove:function(event){this.position(event)},position:function(event){var size=window.getSize(),scroll=window.getScroll(),tip={x:this.tip.offsetWidth,y:this.tip.offsetHeight},props={x:'left',y:'top'},obj={};for(var z in props){obj[props[z]]=event.page[z]+this.options.offset[z];if((obj[props[z]]+tip[z]-scroll[z])>size[z])obj[props[z]]=event.page[z]-this.options.offset[z]-tip[z]}this.tip.setStyles(obj)},fill:function(element,contents){if(typeof contents=='string')element.set('html',contents);else element.adopt(contents)},show:function(el){this.fireEvent('show',[this.tip,el])},hide:function(el){this.fireEvent('hide',[this.tip,el])}});Fx.Marquee=new Class({Extends:Fx.Morph,options:{mode:'horizontal',message:'',revert:true,delay:5000,cssClass:'msg',showEffect:{opacity:1},hideEffect:{opacity:0},revertEffect:{opacity:[0,1]},currentMessage:null},initialize:function(container,options){container=document.id(container);var msg=this.options.currentMessage||(container.getChildren().length==1)?container.getFirst():'';var wrapper=new Element('div',{styles:{position:'relative'},'class':'fxMarqueeWrapper'}).inject(container);this.parent(wrapper,options);this.current=this.wrapMessage(msg)},wrapMessage:function(msg){if(document.id(msg)&&document.id(msg).hasClass('fxMarquee')){var wrapper=document.id(msg)}else{var wrapper=new Element('span',{'class':'fxMarquee',styles:{position:'relative'}});if(document.id(msg))wrapper.grab(document.id(msg));else if($type(msg)=="string")wrapper.set('html',msg)}return wrapper.inject(this.element)},announce:function(options){this.setOptions(options).showMessage();return this},showMessage:function(reverting){(function(){var chain=this.$chain?$A(this.$chain):[];this.clearChain();this.element=document.id(this.element);this.current=document.id(this.current);this.message=document.id(this.message);this.start(this.options.hideEffect).chain(function(){if(reverting){this.message.hide();if(this.current)this.current.show()}else{if(this.message)this.message.dispose();this.message=this.wrapMessage(this.options.message);if(this.current)this.current.hide()}this.start((reverting)?this.options.revertEffect:this.options.showEffect).chain(function(){if(this.$chain)this.$chain.combine(chain);else this.$chain=chain;this.fireEvent((reverting)?'onRevert':'onMessage');if(!reverting&&this.options.revert)this.showMessage(true);else this.callChain.delay(this.options.delay,this)}.bind(this))}.bind(this))}).delay((reverting)?this.options.delay:10,this);return this}});;var xsite="http://www.gamempire.it/",fsite="http://forum.gamempire.it/",pajax=xsite+"includes/ajax.php",rollerx=xsite+"scripts/roller.gif";var fooz=new Date;var unixtime_ms=fooz.getTime();var unixtime=parseInt(unixtime_ms/1000);var unixtimex=unixtime+60*60*24*30;var artab=new Array();artab[1]=new Array();artab[2]=new Array();artab[3]=new Array();function tabber(tabid){artab[tabid][0]=1;var tas=$$('#tabs'+tabid+' .ta'),tabs=$$('#tabs'+tabid+' .tab'),txs=$$('#tabs'+tabid+' .tx'),activo=0;tabs.each(function(tab,z){if(z==0){tab.fade(1);}
else{tab.fade(0);}}.bind(this));tas.each(function(ta,a){if(a==0){ta.setStyle('background-position','-104px -361px')}}.bind(this));txs.each(function(tx,i){if(i!=0){tx.fade(0.3);}
tx.addEvent('mouseenter',function(e){if(activo!=i){tx.fade(0.7);}}.bind(this));tx.addEvent('mouseout',function(e){if(activo!=i){tx.fade(0.3);}}.bind(this));tx.addEvent('click',function(e){if(activo!=i){activo=i;tx.fade(1);txs.each(function(ot,l){if(l!=i){ot.fade(0.3);}});tas.each(function(ta,j){if(j==i){ta.set('opacity','.10');(function(){ta.setStyle('background-position','-104px -361px').fade(1);}).delay(200);}
else{ta.fade(0.1);(function(){ta.setStyle('background-position','-104px -336px').fade(1);}).delay(500);}});tabs.each(function(tab,z){if(i==z){if(artab[tabid][z]!=1){artab[tabid][z]=1;tab.set('html','<div id="loadimg" style="margin-top: 150px; text-align: center; width: 314px;"><img src="'+rollerx+'" /></div>');var takeTab=new Request({method:'post',url:pajax});takeTab.onSuccess=function(responseText,responseXML){tab.set('html',responseText);}
takeTab.send('modific=25&tabid='+tabid+'&ta='+z+'&piatt='+$('piatt').get('html'));}
tab.fade(1);}
else{tab.fade(0);}});}}.bind(this));});}
var takedStinfo=0;var Logy={logyOpen:function(){var logybox=$('logybox'),content=$('logybox_content'),overlay=$('logybox_overlay');if(!Browser.Engine.trident){$$('embed').setStyle('visibility','hidden');}
logybox.setStyle('display','block');content.setStyle('display','block').fade(1);overlay.fade(0.8);},logyStartOpen:function(){var logybox=$('logybox'),contentstart=$('logybox_start_content'),overlay=$('logybox_overlay');if(takedStinfo!=1){$('logybox_start_t').set('html','<img src="'+rollerx+'" style="margin: 260px auto 0;" />');var takeStinfo=new Request({method:'post',url:pajax});takeStinfo.onSuccess=function(responseText,responseXML){takedStinfo=1;$('logybox_start_t').set('html',responseText);$('logybox_start_p0').setStyle('background-position','0 -'+lopBack[p]+'px');}
takeStinfo.send('modific=32');}
if(!Browser.Engine.trident){$$('embed').setStyle('visibility','hidden');}
logybox.setStyle('display','block');contentstart.setStyle('display','block').fade(1);overlay.fade(0.8);},logyBannerOpen:function(){var logybox=$('logybox'),contentbanner=$('logybox_banner_content'),overlay=$('logybox_overlay');var takeBanner=new Request({method:'post',url:pajax});takeBanner.onSuccess=function(responseText,responseXML){$('logybanner_content').set('html',responseText);}
takeBanner.send('modific=36');if(!Browser.Engine.trident){$$('embed').setStyle('visibility','hidden');}
logybox.setStyle('display','block');contentbanner.setStyle('display','block').fade(1);overlay.fade(0.8);},logyClose:function(){var logybox=$('logybox'),content=$('logybox_content'),contentstart=$('logybox_start_content'),contentbanner=$('logybox_banner_content'),overlay=$('logybox_overlay');content.fade(0);contentstart.fade(0);contentbanner.fade(0);overlay.fade(0);(function(){logybox.setStyle('display','none');content.setStyle('display','none');$$('#logybox_content .logydiv').setStyle('display','none');}).delay(800);if(!Browser.Engine.trident){$$('embed').setStyle('visibility','visible');}}};lopBack=new Array(46,215,383);function locont(p){$$('.logyp').setStyle('background-position','');$('logybox_start_p'+p).setStyle('background-position','0 -'+lopBack[p]+'px');$$('#logybox_start_t div').setStyle('display','');$('logybox_start_testo'+p).setStyle('display','block');}
window.addEvent('domready',function(){if($('header')){var ball=$('header').getElement('h1'),cango=1;var ballfx=new Fx.Morph(ball,{duration:1500,link:'cancel',transition:Fx.Transitions.Elastic.easeOut,onStart:function(){cango=0;},onComplete:function(){cango=1;}});var balldrag=new Drag.Move(ball,{onBeforeStart:function(e){if(cango==0){ballfx.cancel();cango=1;}},onComplete:function(){ballfx.start({'top':4,'left':443});}});}
var rwall=Math.round(18*Math.random());$$('body').setStyle('background','url('+xsite+'immagini/sfondi/wall-'+rwall+'.jpg) no-repeat #FFF top center fixed');var content=$('logybox_content'),overlay=$('logybox_overlay');if(overlay){overlay.addEvent('click',function(e){e.stop();Logy.logyClose();}).fade('hide');content.fade('hide');$('logybox_start_content').fade('hide');$('logybox_banner_content').fade('hide');$$('.logybox_close').addEvent('click',function(e){e.stop();Logy.logyClose();});}
if($('logybox_startinfo')){$$('.logyp').each(function(lop,p){if(p==0){lop.setStyle('background-position','0 -'+lopBack[p]+'px');}
lop.addEvent('click',function(e){locont(p);});});$('barra_info').addEvent('click',function(e){Logy.logyStartOpen();});if(Cookie.read('startinfo')==null||Cookie.read('startinfo')<unixtime){Logy.logyStartOpen();Cookie.write('startinfo',unixtimex,{duration:30,path:'/',domain:'.gamempire.it'});}}
if($$('.logyrel')){$$('.logyrel').addEvent('click',function(){Logy.logyOpen();$$('#logybox_content iframe').setStyle('display','block');});}
if($$('.areg')){var takedReg=0;$$('.areg').addEvent('click',function(e){loform=$('logybox_reg_form');losend=$('logybox_reg_send');Logy.logyOpen();$('logybox_reg').setStyle('display','block');loform.setStyle('display','block');losend.setStyle('display','none');if(takedReg!=1){takedReg=1;loform.set('html','<div id="loadimg" style="margin-top: 60px; text-align: center;"><img src="'+rollerx+'" /></div>');var takeReg=new Request({method:'post',url:pajax});takeReg.onSuccess=function(responseText,responseXML){loform.set('html',responseText);losend.set('html','');$('reg_form').addEvent('submit',function(e){e.stop();loform.setStyle('display','none');losend.setStyle('display','block');var doReg=new Request({method:'post',url:pajax}),username=$('reg_username').get('value'),password=$('reg_password').get('value'),email=$('email_reg').get('value');losend.set('html','<div id="loadimg" style="margin-top: 60px; text-align: center;"><img src="'+rollerx+'" /></div>');doReg.onSuccess=function(responseText,responseXML){losend.set('html',responseText);if(responseText.substr(0,8)=="<strong>"){window.logyframe.$('login_input_user').set('value',username);window.logyframe.$('login_input_pwd').set('value',password);$('login_reg').removeEvents('click').addEvent('click',function(e){window.logyframe.$('login_form').submit();});(function(){window.logyframe.$('login_form').submit();}).delay(15000);}
$('backreg').addEvent('click',function(e){e.stop();loform.setStyle('display','block');losend.setStyle('display','none').set('html','');});}
doReg.send('modific=27&username='+username+'&password='+password+'&email='+email);});$('login_reg').addEvent('click',function(){$$('#logybox_content iframe').setStyle('display','block');$('logybox_reg').setStyle('display','none');});}
takeReg.send('modific=26');}});}
if($('login_puls_reg')){$('login_puls_reg').addEvent('click',function(e){window.parent.$$('#logybox_content iframe').setStyle('display','none');window.parent.$$('.areg').fireEvent('click');});}
if($('ricerca_form')){if($('ricerca_form').get('action')==xsite+'cerca/games/'){$$('.ricerca_input').each(function(aut,i){if(i!=2){new Autocompleter.Request.HTML($(aut),pajax,{'indicatorClass':'autocompleter-loading','postVar':'ricerca_txt','autoSubmit':true,'minLength':3,'postData':{'modific':9},'injectChoice':function(choice){var text=choice.getFirst();var value=text.innerHTML;choice.inputValue=value;text.set('html',this.markQueryValue(value));this.addChoiceEvents(choice);}});}});}}
if($('barra_liv')){fade=new Array;fade['livello']=1;fade['punti']=0;var showLivPun=function(){$('barra_liv').fade(fade['livello']);if(fade['livello']==1){fade['livello']=0;}else{fade['livello']=1;}
$('barra_pun').fade(fade['punti']);if(fade['punti']==1){fade['punti']=0;}else{fade['punti']=1;}};var pshowLivPun=showLivPun.create({periodical:4000});pshowLivPun();}
new SmoothScroll({duration:1000},window);var tipz=new Tips('.tips',{showDelay:300,className:'tipz'});var tipd=new Tips('.tipsdown',{showDelay:300,className:'tipd'});var kwock=$$('.kwock'),kwockla=$$('.kwockla'),activo1=30,activo2=40,activo3=50;kwock.each(function(kw,k){ksrc=kw.get('src');if(ksrc==xsite+'immagini/menu/button_onb.png'){activo1=k;}
if(ksrc==xsite+'immagini/menu/button_ony.png'){activo2=k;}
if(ksrc==xsite+'immagini/menu/button_onr.png'){activo3=k;}});kwockla.each(function(kwa,a){if(activo1!=a&&activo2!=a){kwa.fade(0.8);}
kwa.addEvent('mouseenter',function(e){kwock.each(function(kw,i){if(activo1!=i&&activo2!=i&&activo3!=i&&a==i){kw.fade(0.5);kwa.fade(1);}});}.bind(this));kwa.addEvent('mouseout',function(e){kwock.each(function(kw,i){if(activo1!=i&&activo2!=i&&activo3!=i&&a==i){kw.fade(1);kwa.fade(0.8);}});}.bind(this));});var togglers=$$('h3.toggler');var myAccordion=new Accordion($('accordion'),'h3.toggler','div.element',{opacity:false,onActive:function(tog){tog.setStyle('color','#41464D');},onBackground:function(tog){tog.setStyle('color','#528CE0');}});togglers.addEvent('mouseenter',function(){this.fireEvent('click');});tabber(1);var shadv=$('ricerca_index_shadv'),rivar=$$('#ricerca_index_hiadv','#ricerca_index_piatt','#ricerca_index_sez','#ricerca_index_gen'),gianet=0;if(rivar[1]){rivar.fade('hide');var searchSlide=new Fx.Morph('ricerca_index_icons',{duration:1000});$('showadvanced').addEvent('click',function(e){e.stop();shadv.fade(0);if(gianet==0){var takeGener=new Request({method:'post',url:pajax});takeGener.onSuccess=function(responseText,responseXML){rivar[3].set('html',responseText);}
takeGener.send('modific=18');gianet=1;}
(function(){rivar.setStyle('display','block').fade(1);}).delay(500);searchSlide.start({'height':0});});$('hideadvanced').addEvent('click',function(e){e.stop();rivar.fade(0);(function(){shadv.fade(1);rivar[1].selectedIndex=0;rivar[2].selectedIndex=0;rivar[3].selectedIndex=0;}).delay(500);searchSlide.start({'height':47});document.getElementById('ricerca_index_txt').disabled=false;document.getElementById('gen_se').selectedIndex=0;});var takedGame=0;$('apers').addEvent('click',function(e){e.stop();Logy.logyOpen();$('logybox_igamempire').setStyle('display','block');$('logybox_info').setStyle('display','block');if(takedGame!=1){var takeIgame=new Request({method:'post',url:pajax});takeIgame.onSuccess=function(responseText,responseXML){takedGame=1;$('logybox_igamempire').set('html',responseText);}
takeIgame.send('modific=17');}});var takedStat=0;$('astat').addEvent('click',function(e){e.stop();Logy.logyOpen();$('logybox_stat').setStyle('display','block');if(takedStat!=1){var takeStat=new Request({method:'post',url:pajax});takeStat.onSuccess=function(responseText,responseXML){takedStat=1;$('logybox_stat').set('html',responseText);}
takeStat.send('modific=13');}});}
var panactive=0,staferm=[],barra=$('barra_pannello'),barli=$$('#barra_menu li'),divinside=$$('.barra_inside'),presidiv=[],openLi=[],lewi=[110,300,290,0,0,200,435],openMenu=new Fx.Morph('barra_menu',{duration:800,link:'cancel',transition:Fx.Transitions.Quad.easeOut}),roundMenu=new Fx.Morph('barra',{duration:500,link:'cancel',transition:Fx.Transitions.Quad.easeOut}),roundMenuClose=new Fx.Morph('barra_close',{duration:500,link:'cancel',transition:Fx.Transitions.Quad.easeOut});if(barra){barra.addEvent('click',function(e){e.stop();if(panactive==0){barra.setStyle('background-position','-73px -612px');openMenu.start({'height':189,'padding-top':'14px'});$('barra_menu').setStyle('display','block');panactive=1;}
else{barra.setStyle('background-position','-73px -585px');openMenu.start({'height':0,'padding-top':0});(function(){$('barra_menu').setStyle('display','none');}).delay(700);panactive=0;}
divinside.setStyle('display','none');});barra.addEvent('mouseenter',function(e){e.stop();if(panactive==0){barra.setStyle('background-position','-73px -585px');}});barra.addEvent('mouseleave',function(e){e.stop();if(panactive==0){barra.setStyle('background-position','0 -612px');}});$('barra_rdown').addEvent('click',function(e){roundMenu.start({'height':0});(function(){roundMenuClose.start({'height':26});}).delay(500);Cookie.write('barround',1,{duration:365,path:'/',domain:'.gamempire.it'});});$('barra_close').addEvent('click',function(e){roundMenuClose.start({'height':0});(function(){roundMenu.start({'height':26});}).delay(500);Cookie.write('barround',2,{duration:365,path:'/',domain:'.gamempire.it'});});}
$$('body').addEvent('click',function(){if(panactive==1){barra.setStyle('background-position','0 -612px');openMenu.start({'height':0,'padding-top':0});(function(){$('barra_menu').setStyle('display','none');}).delay(700);divinside.setStyle('display','none');panactive=0;}});barli.each(function(li,z){if(z!=3&&z!=4){li.addEvents({'mouseenter':function(){if(panactive==1){$('li'+z).setStyle('background-position','-148px -460px');li.setStyles({'color':'#FFF','background-color':'#4E4E4E'});staferm.each(function(st,s){if(s!=z){staferm[s]=0;}});if(staferm[z]==1){staferm[z]=0;}else{openLi[z].start({'width':[0,lewi[z]]});}
divinside.each(function(div,r){if(r!=z){div.setStyle('display','none');}});$('barra_menu_in'+z).setStyle('display','block');if(z==1||z==2||z==6){if(presidiv[z]!=1){presidiv[z]=1;$('barra_menu_in'+z).set('html','<div id="loadimg" style="margin: 50px auto; text-align: center;"><img src="'+rollerx+'" /></div>');var takeDiv=new Request({method:'post',url:pajax});takeDiv.onSuccess=function(responseText,responseXML){$('barra_menu_in'+z).set('html',responseText);}
fin=z+22;takeDiv.send('modific='+fin);}}}},'mouseleave':function(){if(panactive==1){$('li'+z).setStyle('background-position','-140px -460px');li.setStyles({'color':'#000','background-color':'#5E5E5E'});$('barra_menu_in'+z).setStyle('display','none');}},'click':function(e){e.stop();}});}
else{li.addEvents({'mouseenter':function(){if(panactive==1){li.setStyles({'color':'#FFF','background-color':'#4E4E4E'});divinside.each(function(div,r){if(r!=z){div.setStyle('display','none');}});}},'mouseleave':function(){if(panactive==1){li.setStyles({'color':'#000','background-color':'#5E5E5E'});}}});}}.bind(this));divinside.each(function(div,z){openLi[z]=new Fx.Morph(div,{duration:500,link:'cancel',transition:Fx.Transitions.Quad.easeOut});div.addEvents({'mouseenter':function(e){e.stop();$('li'+z).setStyle('background-position','-148px -460px');barli[z].setStyles({'color':'#000','background-color':'#5E5E5E'});div.setStyle('display','block');},'mouseleave':function(e){e.stop();staferm[z]=1;$('li'+z).setStyle('background-position','-140px -460px');barli[z].setStyles({'color':'#000','background-color':'#5E5E5E'});},'click':function(e){if(z==6){e.stopPropagation();}}});}.bind(this));$$('#barra_menu_in0 li').each(function(li,z){li.addEvents({'click':function(e){e.stop();window.location=xsite+'user/creazione/'+li.get('html').toLowerCase()+'/';}});});if($('barra_news')){fxmq=new Fx.Marquee($('barra_news'),{duration:500,showEffect:{top:[0,0],right:[-100,0],opacity:[0,1]},hideEffect:{top:20},revertEffect:{top:[-30,0],left:[0,0]},revert:false});var annuncia=function(){fxmq.announce({message:$('barra_news_0').get('html')}).chain(function(){fxmq.announce({message:$('barra_news_1').get('html')});}).chain(function(){fxmq.announce({message:$('barra_news_2').get('html')});}).chain(function(){fxmq.announce({message:$('barra_news_3').get('html')});}).chain(function(){fxmq.announce({message:$('barra_news_4').get('html')});}).chain(function(){fxmq.announce({message:$('barra_news_5').get('html')});}).chain(function(){fxmq.announce({message:$('barra_news_6').get('html')});}).chain(function(){fxmq.announce({message:$('barra_news_7').get('html')});}).chain(function(){fxmq.announce({message:$('barra_news_8').get('html')});}).chain(function(){fxmq.announce({message:$('barra_news_9').get('html')});}).chain(function(){annuncia.run();})};annuncia.run();}});var imgLoad=new Image();imgLoad.src=rollerx;function addfurl(irl,addfi){$('ricerca'+addfi+'_form').setProperty('action',xsite+"cerca/"+irl+"/"+$('ricerca'+addfi+'_txt').get('value')+"/").submit();}
function visuaLater(mo){if($('visualater').value==0){unixtimen=unixtime+60*10;Cookie.write('startinfo',unixtimen,{duration:365,path:'/',domain:'.gamempire.it'});$('visualater').value=1;}
else{Cookie.write('startinfo',unixtimex,{duration:365,path:'/',domain:'.gamempire.it'});$('visualater').value=0;}
if(mo==1){if($('visualater').checked==true){$('visualater').checked=false;}
else{$('visualater').checked=true;}}}
function disabSea(i,gor){if(i==0){document.getElementById('ricerca_index_txt').disabled=false;}
else{document.getElementById('ricerca_index_txt').disabled=true;window.location=xsite+"genere/"+gor+"/";}}
function banclick(id){newAjax=new Request({method:'post',url:pajax});newAjax.send('modific=16&id='+id);}
window.pres=0;function hideCompl(){if(window.pres==0){$('automplediv').setStyle('display','none');}}
canperson='Devi essere registrato per poter personalizzare la pagina di Gamempire.<br /><a class="blank" href="'+fsite+'register.php"><strong>Clicca qui per registrarti!</strong></a>';function piattpref(id,piatt){var elemento=$('setpiattpref'),newAjax=new Request({method:'post',url:pajax});elemento.set('html','<div id="loadimg" style="width:280px; text-align:center;"><img src="'+rollerx+'" /></div>');newAjax.onSuccess=function(responseText,responseXML){if(id!=0){if(piatt!=""){elemento.set('html','Hai selezionato la console <span class="c_azzurro"><strong>'+piatt.substr(0,1).toUpperCase()+piatt.substr(1,piatt.length)+'</strong></span> come pagina predefinita.<br /> Per modificare o cancellare la tua preferenza, <strong><a class="c_azzurro" href="javascript:void(0);" onclick="modpiattpref('+id+')">Clicca qui</a></strong>.');}
else{elemento.set('html','Hai selezionato la pagina <strong>generale</strong> come pagina predefinita.<br /> Per modificare o cancellare la tua preferenza, <strong><a class="c_azzurro" href="javascript:void(0);" onclick="modpiattpref('+id+')">Clicca qui</a></strong>.');}}
else{elemento.set('html',canperson);}}
newAjax.send('modific=11&id='+id+'&piatt='+piatt);}
function modpiattpref(id){$('setpiattpref').set('html','<select name="piatt"><option value="" onclick="piattpref('+id+', this.value)">Scegli...</option><option value="" onclick="piattpref('+id+', this.value)">Nessuna</option><option value="pc" onclick="piattpref('+id+', this.value)">Pc</option><option value="ps3" onclick="piattpref('+id+', this.value)">Ps3</option><option value="xbox 360" onclick="piattpref('+id+', this.value)">Xbox 360</option><option value="psp" onclick="piattpref('+id+', this.value)">Psp</option><option value="wii" onclick="piattpref('+id+', this.value)">Wii</option><option value="ds" onclick="piattpref('+id+', this.value)">Ds</option><option value="ps2" onclick="piattpref('+id+', this.value)">Ps2</option></select><br />Seleziona la pagina della tua <span class="c_azzurro">console preferita</span> come pagina predefinita');}
function gome(){document.cookie="gome=1";}
function colorpref(id,color){var elemento=$('setcolorpref'),newAjax=new Request({method:'post',url:pajax});elemento.set('html','<div id="loadimg" style="width:280px; text-align:center;"><img src="'+rollerx+'" /></div>');newAjax.onSuccess=function(responseText,responseXML){if(id!=0){elemento.innerHTML='Il modulo per personalizzare Gamempire cambiando colore non &egrave; ancora attivo.<br />Sarà disponibile a breve.<br />Scusate per l\'imprevisto.';}
else{elemento.innerHTML=canperson;}}
newAjax.send('modific=12&id='+id+'&color='+color);}
function popinfo(info){var w=600;var h=400;var l=Math.floor((screen.width-w)/2);var t=Math.floor((screen.height-h)/2);window.open(xsite+"admin/info.php?info="+info,"","width="+w+",height="+h+",top="+t+",left="+l);}
function apri(perc){window.location=xsite+perc;};window.addEvent('domready',function(){var elenco=$('elenco'),eltr=$$('#elenco tr');zoomElenco=new Array();zoomElenco2=new Array();isDefi=new Array();isDefi2=new Array();if(elenco){eltr.each(function(tr,i){tr.addEvent('mouseenter',function(e){e.stop();if(isDefi[i]!=1){zoomElenco[i]=new Fx.Morph('img_'+i,{'link':'chain',duration:200});isDefi[i]=1;}
zoomElenco[i].start({'width':[100]});}.bind(this));tr.addEvent('mouseleave',function(e){e.stop();if(isDefi2[i]!=1){zoomElenco2[i]=new Fx.Morph('img_'+i,{'link':'chain',duration:200});isDefi2[i]=1;}
zoomElenco2[i].start({'width':[85]});}.bind(this));}.bind(this));}
adv_rightbar=$('adv_rightbarx');$$('.banner_close').addEvent('click',function(e){e.stop();adv_rightbar.fade(0);var hBan=new Fx.Morph(adv_rightbar,{duration:800});hBan.start({'height':0,'margin-top':0});(function(){adv_rightbar.setStyle('display','none');}).delay(800);});var selected=$('selected');if(selected){var firstDiv=new Element('div',{id:'backmove'}),secondtDiv=new Element('div',{id:'backmove_left'}),wipag=958;firstDiv.inject('overbox');secondtDiv.inject(firstDiv);var backmove=$('backmove');if(selected.getProperty('class')=='empto'){empto=1;}else{empto=0;}
var sBody=($(document.body).getCoordinates().width-wipag)/2,leftstart=selected.getCoordinates().left;if(empto==1){backmove.fade(0);var widthstart=10;}
else{var widthstart=selected.getCoordinates().width;}
var bgmoveFx=new Fx.Morph(backmove,{duration:800,'link':'cancel','transition':Fx.Transitions.Sine.easeOut});var bgexpandFx=new Fx.Morph('backmove_left',{duration:800,'link':'cancel','transition':Fx.Transitions.Sine.easeOut});if(document.all){bgmoveFx.start({'left':leftstart-sBody+1});}
else{bgmoveFx.start({'left':leftstart-sBody});}
bgexpandFx.start({'width':widthstart});var alf=$$('#alfabetico a');alf.each(function(aaa,i){aaa.addEvent('mouseenter',function(e){e.stop();var sBody=($(document.body).getCoordinates().width-wipag)/2,lcoord=aaa.getCoordinates().left,wcoord=aaa.getCoordinates().width;if(empto==1){backmove.fade(1);}
if(document.all){bgmoveFx.start({'left':lcoord-sBody+1});}
else{bgmoveFx.start({'left':lcoord-sBody});}
bgexpandFx.start({'width':wcoord});}.bind(this));aaa.addEvent('click',function(e){leftstart=aaa.getCoordinates().left;widthstart=aaa.getCoordinates().width;}.bind(this));}.bind(this));$('alfabetico').addEvent('mouseleave',function(e){e.stop();if(empto==1){(function(){backmove.fade(0)}).delay(300);}
if(document.all){bgmoveFx.start({'left':leftstart-sBody+1});}
else{bgmoveFx.start({'left':leftstart-sBody});}
bgexpandFx.start({'width':widthstart});}.bind(this));}
function showFriendMail(){Logy.logyOpen();$('logybox_emailfriend').setStyle('display','block');$('logybox_emailfriend').set('html','<div id="loadimg" style="width: 300px; margin-top: 80px; text-align: center;"><img src="'+rollerx+'" /></div>');var takeEmail=new Request({method:'post',url:pajax});takeEmail.onSuccess=function(responseText,responseXML){$('logybox_emailfriend').set('html',responseText);$('segnal_puls').addEvent('click',function(e){var sendEmail=new Request({method:'post',url:pajax});sendEmail.onSuccess=function(responseText,responseXML){$('logybox_emailfriend').set('html',responseText);$('backmail').addEvent('click',function(e){e.stop();showFriendMail();});}
var linkx=$('linkx').get('value'),titolo=$('titolo').get('value'),piattaforma=$('piattaforma').get('value'),autore=$('autore').get('value'),data=$('data').get('value'),type=$('type').get('value'),friendmail=$('friendmail').get('value'),tuamail=$('tuamail').get('value'),tuonome=$('tuonome').get('value'),friendcomment=$('friendcomment').get('value');$('logybox_emailfriend').set('html','<div id="loadimg" style="width: 300px; margin-top: 80px; text-align: center;"><img src="'+rollerx+'" /></div>');sendEmail.send('modific=15&linkx='+linkx+'&titolo='+titolo+'&piattaforma='+piattaforma+'&autore='+autore+'&data='+data+'&type='+type+'&friendmail='+friendmail+'&tuamail='+tuamail+'&tuonome='+tuonome+'&friendcomment='+friendcomment);});}
var infox=$('aemail').get('rel');takeEmail.send('modific=14&info='+infox);}
if($('aemail')){$('aemail').addEvent('click',function(e){e.stop();showFriendMail();});}
if($('atag')){$('atag').addEvent('click',function(e){e.stop();Logy.logyOpen();$('logybox_tag').setStyle('display','block').set('html','<div id="loadimg" style="width: 300px; margin-top: 80px; text-align: center;"><img src="'+rollerx+'" /></div>');var takeTag=new Request({method:'post',url:pajax});takeTag.onSuccess=function(responseText,responseXML){$('logybox_tag').set('html',responseText);$('tag_puls').addEvent('click',function(e){var sendTag=new Request({method:'post',url:pajax});sendTag.onSuccess=function(responseText,responseXML){$('logybox_tag').set('html',responseText);}
var tags=str_replace('&','#-#',htmlentities($('tags').get('value'))),id=$('id').get('value'),type=$('type').get('value');$('logybox_tag').set('html','<div id="loadimg" style="width: 300px; margin-top: 80px; text-align: center;"><img src="'+rollerx+'" /></div>');sendTag.send('modific=22&tags='+tags+'&id='+id+'&type='+type);});}
var info=$('atag').get('rel');takeTag.send('modific=21&info='+info);});}
$$('.delimg').each(function(del,d){del.fade(0).addEvents({'mouseenter':function(){del.fade(1);}.bind(this),'mouseout':function(){del.fade(0);}.bind(this),'click':function(){if(confirm('Sei sicuro di voler cancellare questa immagine?')){id=del.getParent().get('id').substr(2);d=del.get('id').substr(8+id.length);var senDel=new Request({method:'post',url:pajax});senDel.onSuccess=function(responseText,responseXML){$$('#tab_'+id+' .delimg').each(function(tab,t){dx=tab.get('id').substr(8+id.length);if(dx>d){$('delimg_'+id+'_'+dx).set('id','delimg_'+id+'_'+(dx-1));}});del.getParent().fade(0);(function(){del.getParent().dispose();}).delay(800);$$('#tab_'+id+' .visimg').addEvent('click',function(e){e.stop();alert("Siccome hai cancellato delle immagini, per permetterti di visualizzare le altre verrà aggiornata la pagina.");window.location.href=unescape(window.location.pathname);});}
senDel.send('modific=35&id='+id+'&num='+d);}}});});$$('.visimg').each(function(vis,v){vis.addEvents({'mouseenter':function(){vis.getParent().getParent().getChildren('.delimg').fade(0.5);},'mouseout':function(){vis.getParent().getParent().getChildren('.delimg').fade(0);}});});if($('sgames')){function setRicind(aj,va){theSearch(aj);$('ricerca_index_puls').setProperty("onclick","theSearch('"+aj+"');");$('ricerca_puls').setProperty("onclick","theSearch('"+aj+"');");ritx=$('ricerca_index_txt').get('value');if(ritx=="Cerca videogioco..."||ritx=="Cerca news..."||ritx=="Cerca tags..."||ritx=="Cerca forum..."){$('ricerca_index_txt').set('value','Cerca '+va+'...');}
ritx2=$('ricerca_txt').get('value');if(ritx2=="Cerca videogioco..."||ritx2=="Cerca news..."||ritx2=="Cerca tags..."||ritx2=="Cerca forum..."){$('ricerca_txt').set('value','Cerca '+va+'...');}
$('ricerca_index_txt').setPropertys({"onclick":"if(this.value=='Cerca "+va+"...')this.value='';","onblur":"if(this.value=='')this.value='Cerca "+va+"...';"});$('ricerca_txt').setProperty({"onclick":"if(this.value=='Cerca "+va+"...')this.value='';","onblur":"if(this.value=='')this.value='Cerca "+va+"...';"});$('type_sep').set('html','Ricerca '+va);if((aj=="games"||aj=="tagsg")&&$('box_news_search_center')){$('box_news_search_center').setProperty('id','box_ricerca_center');}
else if($('box_ricerca_center')){$('box_ricerca_center').setProperty('id','box_news_search_center');}}
$('sgames').addEvent('click',function(e){setRicind('games','videogioco');});$('stagsg').addEvent('click',function(e){setRicind('tagsg','tags');});$('stagsn').addEvent('click',function(e){setRicind('tagsn','tags');});$('snews').addEvent('click',function(e){setRicind('news','news');});$('sforum').addEvent('click',function(e){setRicind('forum','forum');});}});wiOpen=new Array();function openDispose(nom){if($('open_'+nom)){wiOpen[nom]=new Fx.Morph('open_'+nom,{duration:1000,transition:Fx.Transitions.Sine.easeOut});$('open_'+nom).fade(0);(function(){wiOpen[nom].start({'width':0,'margin':0});}).delay(400);}}
function openApp(id,type,app){$('resopen_'+id).set('html','<img src="'+rollerx+'" align="center" />');var putApp=new Request({method:'post',url:pajax});putApp.onSuccess=function(responseText,responseXML){openDispose('approva_'+id);openDispose('disapprova_'+id);var putResapp=new Request({method:'post',url:pajax});putResapp.onSuccess=function(responseText2,responseXML){$('resopen_'+id).set('html',responseText);$('open_numgrey_'+id).set('html',responseText2).fade('hide').setStyle('display','block').fade(1);}
putResapp.send('modific=33&id='+id+'&type='+type);}
putApp.send('modific=31&id='+id+'&type='+type+'&app='+app);}
stapprov=0;function appComm(id,app){if(stapprov==0){stapprov=1;$('divapp_'+id).set('html','<img src="'+xsite+'scripts/roller-mini.gif" />');var comApp=new Request({method:'post',url:pajax});comApp.onSuccess=function(responseText,responseXML){$('divapp_'+id).set('html',responseText);stapprov=0;}
comApp.send('modific=31&id='+id+'&type=commento&app='+app);}}
function openMod(id,type){window.location=xsite+'user/creazione/'+type+'/'+id+'/';}
function openCanc(id,type,ne){if(confirm("Sei sicuro di voler cancellare questo articolo? La tua azione sar&agrave; registrata e se inappropriata, perderai molti punti.")){if(ne==0){$('resopen_'+id).set('html','<img src="'+rollerx+'" align="center" />');}
var putApp=new Request({method:'post',url:pajax});putApp.onSuccess=function(responseText,responseXML){if(ne==0){openDispose('approva_'+id);openDispose('disapprova_'+id);openDispose('modifica_'+id);openDispose('cancella_'+id);openDispose('segnala_'+id);$('resopen_'+id).set('html',responseText);}
else{$('liart_'+type+'_'+id).dispose();}}
putApp.send('modific=34&id='+id+'&type='+type);}}
var startSegn=0,initiaSegn=0;function openSegn(id,type,motivo){if(initiaSegn==0){openSegna=new Fx.Morph('open_segnalacase_'+id,{duration:1500,link:'cancel',transition:Fx.Transitions.Quad.easeOut});openSegnins=new Fx.Morph('open_segnalains_'+id,{duration:1500,link:'cancel',transition:Fx.Transitions.Quad.easeOut});initiaSegn=1;}
if(startSegn==0){vase1=140;vase2=31;vase3=36;startSegn=1;}
else{if(motivo==0){vase1=0;vase2=0;vase3=0;startSegn=0;}
else{vase1=32;vase2=31;vase3=36;startSegn=1;}}
openSegna.start({'height':vase1,'margin-top':vase3});openSegnins.start({'height':vase2});if(motivo!=0){$('open_segnalacase_'+id).set('html','<img src="'+rollerx+'" align="center" />');var newAjax=new Request({method:'post',url:pajax});newAjax.onSuccess=function(responseText,responseXML){$('open_segnalacase_'+id).set('html',responseText);openDispose('segnala_'+id);}
newAjax.send('modific=20&id='+id+'&type='+type+'&motivo='+motivo);}}
function addPrefer(id){$('scheda_preferito').set('html','<img src="'+rollerx+'" align="center" />');var newAjax=new Request({method:'post',url:pajax});newAjax.onSuccess=function(responseText,responseXML){$('scheda_preferito').set('html',responseText);}
newAjax.send('modific=1&id='+id);}
function delPrefer(id){if(confirm('Sei sicuro di voler cancellare questo gioco dai tuoi preferiti?')){var elemento=$('divpref'),newAjax=new Request({method:'post',url:pajax});elemento.set('html','<div id="loadimg" style="width: 560px; text-align: center;"><img src="'+rollerx+'" /></div>');newAjax.onSuccess=function(responseText,responseXML){elemento.removeChild($('loadimg')).removeChild($('pref_'+id)).set('html',elemento.get('html')+responseText);}
newAjax.send('modific=4&id='+id);}}
function delAllPrefer(){if(confirm('Sei sicuro di voler cancellare tutti i tuoi preferiti?')){var elemento=$('divpref'),newAjax=new Request({method:'post',url:pajax});elemento.set('html','<div id="loadimg" style="width: 560px; text-align: center;"><img src="'+rollerx+'" /></div>');newAjax.onSuccess=function(responseText,responseXML){elemento.removeChild($('loadimg')).set('html',responseText);$('canctot').setStyle('display','none');}
newAjax.send('modific=5');}}
function addComment(id,id_art,dove,user_id){utente=$('utente').get('value');email=$('email').get('value');commento=$('commento').get('value');var privacy=0;if($('privacy').checked==true){privacy=1;}
message="modific=2&id="+id+"&id_art="+id_art+"&dove="+dove+"&utente="+utente+"&email="+email+"&commento="+escape(commento)+"&privacy="+privacy;if(user_id==0){recaptcha_challenge_field=$('recaptcha_challenge_field').get('value');recaptcha_response_field=$('recaptcha_response_field').get('value');message+="&recaptcha_challenge_field="+recaptcha_challenge_field+"&recaptcha_response_field="+recaptcha_response_field;}
var elemento=$('proxcomm'),newAjax=new Request({method:'post',url:pajax});elemento.set('html','<div id="loadimg" style="width: 630px; text-align: center;"><img src="'+rollerx+'" /></div>');$('commenta').setStyle('display','none');newAjax.onSuccess=function(responseText,responseXML){elemento.removeChild($('loadimg'));if(!$('response')){newel=document.createElement("div");newel.setAttribute("id","response");$('commenti').appendChild(newel);}
else{$('response').setStyle('display','');}
if(responseText.substr(0,2)!="<p"){$('response').set('html','<strong>Il tuo commento &egrave; stato inviato.</strong><br />Grazie per la partecipazione.');elemento.set('html',responseText);}
else{$('response').set('html',responseText+'<br /><br /><a href="javascript: tornComm()">Torna al commento</a>');}}
newAjax.send(message);}
function tornComm(){$('commenta').setStyle('display','');$('response').setStyle('display','none');}
function delComment(id,utente,idutente,mod){if(confirm('Sei sicuro di voler cancellare questo commento?')){var elemento=$('visuacomm'),newAjax=new Request({method:'post',url:pajax});elemento.set('html',elemento.get('html')+'<div id="loadimg" style="width: 630px; text-align: center;"><img src="'+rollerx+'" /></div>');newAjax.onSuccess=function(responseText,responseXML){elemento.removeChild($('loadimg'));$('response').set('html','<a href="javascript: tornComm()">Torna al commento</a>');if(mod==1){$('trfc_'+id).dispose();$('trsc_'+id).dispose();}
else if(mod==2){$('proxcomm').set('html','');}}
newAjax.send('modific=3&id='+id+'&utente='+utente+'&idutente='+idutente);}}
String.prototype.br2nl=function(){var nl;if(typeof arguments[0]!='undefined'){nl=arguments[0];}
else{nl='\r\n';}
return this.replace(/\<br(\s*\/|)\>/g,nl);}
function editComment(id){var commento=$('trsc_'+id),edit=$('edit_'+id);thecomm=commento.get('html');commento.set('html','<textarea id="area_'+id+'" cols="73" rows="3" onchange="sendComment('+id+', this.value)">'+thecomm.replace(/<br\s*\/?>/mg,"\r")+'</textarea>');edit.set('onclick','').set('title','Invia modifica');}
function sendComment(id,commfin){var elemento=$('trsc_'+id);elemento.innerHTML='<div id="loadimg" style="width: 610px; text-align: center;"><img src="'+rollerx+'" /></div>';var sendComm=new Request({method:'post',url:pajax});sendComm.onSuccess=function(responseText,responseXML){$('trsc_'+id).innerHTML=responseText;$('edit_'+id).set('onclick','editComment('+id+')').set('title','Modifica commento');}
sendComm.send("modific=19&id="+id+"&commento="+commfin);}
var stasegn=0;function segnComment(id){if(stasegn==0){stasegn=1;$('divsegn_'+id).set('html',$('divsegn_'+id).get('html')+'<img src="'+xsite+'scripts/roller-mini.gif" />');$('segnal_'+id).setStyle('display','none');var comSegn=new Request({method:'post',url:pajax});comSegn.onSuccess=function(responseText,responseXML){$$('#divsegn_'+id+' img').dispose();$('segnal_'+id).removeClass('ico-segnal').addClass('ico-segnalato').setStyle('display','');stasegn=0;}
comSegn.send('modific=20&id='+id+'&type=commento');}}
function controlloComm(id,id_art,dove,user_id){var cag=new Custom.Alert('<span class="titalert">Gamempire Alert</span>','<b>Attenzione!</b> <br /><br /> <span class="little">Non hai inserito il tuo nickname.</span>',{content:'html',text:{confirmButtonText:'',closeButtonText:''},width:315,height:238,opacify:true,draggable:true,zones:{box:'box4',head:'head4',body:'body4',buttonBox:'buttonBox4'},buttons:{closeButton:'cancelButton4',confirmButton:'confirmButton4'},overlay:'#000'});var f=0;var e=0;var ok=true;var a=$('email');if($('utente').value==''){cag.create();$('utente').focus();return false;}
else if(a.value==''){cag.create();cag.setText('<b>Attenzione!</b> <br /><br /> <span class="little">Non hai inserito l\'email.</span>');$('email').focus();return false;}
else if(a.value.search(/^\w+((-\w+)|(\.\w+))*\@\w+((\.|-)\w+)*\.\w+$/)==-1){cag.create();cag.setText('<b>Attenzione!</b> <br /><br /> <span class="little">L\'email inserita non è valida</span>');$('email').focus();return false;}
else if($('commento').value.length<19){cag.create();cag.setText('<b>Attenzione!</b> <br /><br /> <span class="little">Il commento deve essere composto da almeno 20 caratteri.</span>');$('commento').focus();return false;}
else if($('recaptcha_challenge_field')&&$('recaptcha_response_field').value==''){cag.create();cag.setText('<b>Attenzione!</b> <br /><br /> <span class="little">Non hai inserito il codice di sicurezza</span>');$('commento').focus();return false;}
else{addComment(id,id_art,dove,user_id);}}
var maxc=500;function contatoreComm(){if($('commento').value.length>maxc){$('commento').value=$('commento').value.substring(0,maxc);}
$('sottocomm').set('html','('+(maxc-$('commento').value.length)+' caratteri rimanenti)');}
function theSearch(mode){var elemento=$('search');ricerca_txt=$('ricerca_index_txt').get('value');piatt_se=$('ricerca_index_piatt').get('value');if($('gen_se')){gen_se=$('gen_se').get('value');}
else{gen_se="";}
if(mode=="games"){sez_se=$('ricerca_index_sez').get('value');}
else{sez_se="";}
pagina=1;if(mode+ricerca_txt+piatt_se+sez_se+gen_se+pagina==recode){alert('Non hai cambiato nessun parametro di ricerca');}
else{recode=mode+ricerca_txt+piatt_se+sez_se+gen_se+pagina;if(ricerca_txt=="Cerca videogioco..."||ricerca_txt=="Cerca news..."||ricerca_txt=="Cerca tags..."||ricerca_txt=="Cerca forum..."){ricerca_txt="";}
if(ricerca_txt==""){ricerca_display="Nessun dato immesso";}else{ricerca_display=ricerca_txt;}
elemento.set('html','<div id="loadimg" style="width: 649px; text-align: center; margin: 10px 0px;"><img src="'+rollerx+'" /></div>');switch(mode){case'games':message="modific=8&piatt_se="+piatt_se+"&sez_se="+sez_se+"&gen_se="+gen_se+"&pagina="+pagina+"&statag=0";break;case'news':message="modific=29&piatt_se="+piatt_se+"&statag=0";break;case'tagsg':message="modific=8&piatt_se="+piatt_se+"&statag=1";break;case'tagsn':message="modific=29&piatt_se="+piatt_se+"&statag=1";break;case'forum':message="modific=30&piatt_se="+piatt_se;break;}
message+="&ricerca_txt="+ricerca_txt;var takeSearch=new Request({method:'post',url:pajax});takeSearch.onSuccess=function(responseText,responseXML){if(gen_se!=""){$('tit_ricerca').set('html',gen_se);}
else{$('tit_ricerca').set('html',ricerca_display);}
elemento.set('html',responseText);}
takeSearch.send(message);}}
function textSize(plumin,id){if(id==0){idbox='box';}else{idbox='box_trucchi_center';}
sizeFo=$('box').getStyle('font-size').toInt();if(plumin==0){sizeFo--;}
else if(plumin==1){sizeFo++;}
if(sizeFo>10&&sizeFo<19){$(idbox).setStyle('font-size',sizeFo);}}
function str_replace(search,replace,subject){var f=search,r=replace,s=subject;var ra=r instanceof Array,sa=s instanceof Array,f=[].concat(f),r=[].concat(r),i=(s=[].concat(s)).length;while(j=0,i--){if(s[i]){while(s[i]=s[i].split(f[j]).join(ra?r[j]||"":r[0]),++j in f){};}};return sa?s:s[0];}
function htmlentities(string,quote_style){var histogram={},symbol='',tmp_str='',i=0;tmp_str=string.toString();if(false===(histogram=get_html_translation_table('HTML_ENTITIES',quote_style))){return false;}
for(symbol in histogram){entity=histogram[symbol];tmp_str=tmp_str.split(symbol).join(entity);}
return tmp_str;}
function get_html_translation_table(table,quote_style){var entities={},histogram={},decimal=0,symbol='';var constMappingTable={},constMappingQuoteStyle={};var useTable={},useQuoteStyle={};useTable=(table?table.toUpperCase():'HTML_SPECIALCHARS');useQuoteStyle=(quote_style?quote_style.toUpperCase():'ENT_COMPAT');constMappingTable[0]='HTML_SPECIALCHARS';constMappingTable[1]='HTML_ENTITIES';constMappingQuoteStyle[0]='ENT_NOQUOTES';constMappingQuoteStyle[2]='ENT_COMPAT';constMappingQuoteStyle[3]='ENT_QUOTES';if(!isNaN(useTable)){useTable=constMappingTable[useTable];}
if(!isNaN(useQuoteStyle)){useQuoteStyle=constMappingQuoteStyle[useQuoteStyle];}
if(useTable=='HTML_SPECIALCHARS'){entities['60']='&lt;';entities['62']='&gt;';entities['38']='&amp;';}else if(useTable=='HTML_ENTITIES'){entities['38']='&amp;';entities['60']='&lt;';entities['62']='&gt;';entities['160']='&nbsp;';entities['161']='&iexcl;';entities['162']='&cent;';entities['163']='&pound;';entities['164']='&curren;';entities['165']='&yen;';entities['166']='&brvbar;';entities['167']='&sect;';entities['168']='&uml;';entities['169']='&copy;';entities['170']='&ordf;';entities['171']='&laquo;';entities['172']='&not;';entities['173']='&shy;';entities['174']='&reg;';entities['175']='&macr;';entities['176']='&deg;';entities['177']='&plusmn;';entities['178']='&sup2;';entities['179']='&sup3;';entities['180']='&acute;';entities['181']='&micro;';entities['182']='&para;';entities['183']='&middot;';entities['184']='&cedil;';entities['185']='&sup1;';entities['186']='&ordm;';entities['187']='&raquo;';entities['188']='&frac14;';entities['189']='&frac12;';entities['190']='&frac34;';entities['191']='&iquest;';entities['192']='&Agrave;';entities['193']='&Aacute;';entities['194']='&Acirc;';entities['195']='&Atilde;';entities['196']='&Auml;';entities['197']='&Aring;';entities['198']='&AElig;';entities['199']='&Ccedil;';entities['200']='&Egrave;';entities['201']='&Eacute;';entities['202']='&Ecirc;';entities['203']='&Euml;';entities['204']='&Igrave;';entities['205']='&Iacute;';entities['206']='&Icirc;';entities['207']='&Iuml;';entities['208']='&ETH;';entities['209']='&Ntilde;';entities['210']='&Ograve;';entities['211']='&Oacute;';entities['212']='&Ocirc;';entities['213']='&Otilde;';entities['214']='&Ouml;';entities['215']='&times;';entities['216']='&Oslash;';entities['217']='&Ugrave;';entities['218']='&Uacute;';entities['219']='&Ucirc;';entities['220']='&Uuml;';entities['221']='&Yacute;';entities['222']='&THORN;';entities['223']='&szlig;';entities['224']='&agrave;';entities['225']='&aacute;';entities['226']='&acirc;';entities['227']='&atilde;';entities['228']='&auml;';entities['229']='&aring;';entities['230']='&aelig;';entities['231']='&ccedil;';entities['232']='&egrave;';entities['233']='&eacute;';entities['234']='&ecirc;';entities['235']='&euml;';entities['236']='&igrave;';entities['237']='&iacute;';entities['238']='&icirc;';entities['239']='&iuml;';entities['240']='&eth;';entities['241']='&ntilde;';entities['242']='&ograve;';entities['243']='&oacute;';entities['244']='&ocirc;';entities['245']='&otilde;';entities['246']='&ouml;';entities['247']='&divide;';entities['248']='&oslash;';entities['249']='&ugrave;';entities['250']='&uacute;';entities['251']='&ucirc;';entities['252']='&uuml;';entities['253']='&yacute;';entities['254']='&thorn;';entities['255']='&yuml;';}else{throw Error("Table: "+useTable+' not supported');return false;}
if(useQuoteStyle!='ENT_NOQUOTES'){entities['34']='&quot;';}
if(useQuoteStyle=='ENT_QUOTES'){entities['39']='&#039;';}
for(decimal in entities){symbol=String.fromCharCode(decimal)
histogram[symbol]=entities[decimal];}
return histogram;};var Observer=new Class({Implements:[Options,Events],options:{periodical:false,delay:1000},initialize:function(el,onFired,options){this.element=$(el)||$$(el);this.addEvent('onFired',onFired);this.setOptions(options);this.bound=this.changed.bind(this);this.resume();},changed:function(){var value=this.element.get('value');if($equals(this.value,value))return;this.clear();this.value=value;this.timeout=this.onFired.delay(this.options.delay,this);},setValue:function(value){this.value=value;this.element.set('value',value);return this.clear();},onFired:function(){this.fireEvent('onFired',[this.value,this.element]);},clear:function(){$clear(this.timeout||null);return this;},pause:function(){if(this.timer)$clear(this.timer);else this.element.removeEvent('keyup',this.bound);return this.clear();},resume:function(){this.value=this.element.get('value');if(this.options.periodical)this.timer=this.changed.periodical(this.options.periodical,this);else this.element.addEvent('keyup',this.bound);return this;}});var $equals=function(obj1,obj2){return(obj1==obj2||JSON.encode(obj1)==JSON.encode(obj2));};var Autocompleter=new Class({Implements:[Options,Events],options:{minLength:1,markQuery:true,width:'inherit',maxChoices:10,injectChoice:null,customChoices:null,emptyChoices:null,visibleChoices:true,className:'autocompleter-choices',zIndex:42,delay:400,observerOptions:{},fxOptions:{},autoSubmit:false,overflow:false,overflowMargin:25,selectFirst:false,filter:null,filterCase:false,filterSubset:false,forceSelect:false,selectMode:true,choicesMatch:null,multiple:false,separator:', ',separatorSplit:/\s*[,;]\s*/,autoTrim:false,allowDupes:false,cache:true,relative:false},initialize:function(element,options){this.element=$(element);this.setOptions(options);this.build();this.observer=new Observer(this.element,this.prefetch.bind(this),$merge({'delay':this.options.delay},this.options.observerOptions));this.queryValue=null;if(this.options.filter)this.filter=this.options.filter.bind(this);var mode=this.options.selectMode;this.typeAhead=(mode=='type-ahead');this.selectMode=(mode===true)?'selection':mode;this.cached=[];},build:function(){if($(this.options.customChoices)){this.choices=this.options.customChoices;}else{this.choices=new Element('ul',{'class':this.options.className,'styles':{'zIndex':this.options.zIndex}}).inject(document.body);this.relative=false;if(this.options.relative){this.choices.inject(this.element,'after');this.relative=this.element.getOffsetParent();}
this.fix=new OverlayFix(this.choices);}
if(!this.options.separator.test(this.options.separatorSplit)){this.options.separatorSplit=this.options.separator;}
this.fx=(!this.options.fxOptions)?null:new Fx.Tween(this.choices,$merge({'property':'opacity','link':'cancel','duration':200},this.options.fxOptions)).addEvent('onStart',Chain.prototype.clearChain).set(0);this.element.setProperty('autocomplete','off').addEvent((Browser.Engine.trident||Browser.Engine.webkit)?'keydown':'keypress',this.onCommand.bind(this)).addEvent('click',this.onCommand.bind(this,[false])).addEvent('focus',this.toggleFocus.create({bind:this,arguments:true,delay:100})).addEvent('blur',this.toggleFocus.create({bind:this,arguments:false,delay:100}));},destroy:function(){if(this.fix)this.fix.destroy();this.choices=this.selected=this.choices.destroy();},toggleFocus:function(state){this.focussed=state;if(!state)this.hideChoices(true);this.fireEvent((state)?'onFocus':'onBlur',[this.element]);},onCommand:function(e){if(!e&&this.focussed)return this.prefetch();if(e&&e.key&&!e.shift){switch(e.key){case'enter':if(this.element.value!=this.opted)return true;if(this.selected&&this.visible){this.choiceSelect(this.selected);return!!(this.options.autoSubmit);}
break;case'up':case'down':if(!this.prefetch()&&this.queryValue!==null){var up=(e.key=='up');this.choiceOver((this.selected||this.choices)[(this.selected)?((up)?'getPrevious':'getNext'):((up)?'getLast':'getFirst')](this.options.choicesMatch),true);}
return false;case'esc':case'tab':this.hideChoices(true);break;}}
return true;},setSelection:function(finish){var input=this.selected.inputValue,value=input;var start=this.queryValue.length,end=input.length;if(input.substr(0,start).toLowerCase()!=this.queryValue.toLowerCase())start=0;if(this.options.multiple){var split=this.options.separatorSplit;value=this.element.value;start+=this.queryIndex;end+=this.queryIndex;var old=value.substr(this.queryIndex).split(split,1)[0];value=value.substr(0,this.queryIndex)+input+value.substr(this.queryIndex+old.length);if(finish){var tokens=value.split(this.options.separatorSplit).filter(function(entry){return this.test(entry);},/[^\s,]+/);if(!this.options.allowDupes)tokens=[].combine(tokens);var sep=this.options.separator;value=tokens.join(sep)+sep;end=value.length;}}
this.observer.setValue(value);this.opted=value;if(finish||this.selectMode=='pick')start=end;this.element.selectRange(start,end);this.fireEvent('onSelection',[this.element,this.selected,value,input]);},showChoices:function(){var match=this.options.choicesMatch,first=this.choices.getFirst(match);this.selected=this.selectedValue=null;if(this.fix){var pos=this.element.getCoordinates(this.relative),width=this.options.width||'auto';this.choices.setStyles({'left':pos.left,'top':pos.bottom,'width':(width===true||width=='inherit')?pos.width:width});}
if(!first)return;if(!this.visible){this.visible=true;this.choices.setStyle('display','');if(this.fx)this.fx.start(1);this.fireEvent('onShow',[this.element,this.choices]);}
if(this.options.selectFirst||this.typeAhead||first.inputValue==this.queryValue)this.choiceOver(first,this.typeAhead);var items=this.choices.getChildren(match),max=this.options.maxChoices;var styles={'overflowY':'hidden','height':''};this.overflown=false;if(items.length>max){var item=items[max-1];styles.overflowY='scroll';styles.height=item.getCoordinates(this.choices).bottom;this.overflown=true;};this.choices.setStyles(styles);this.fix.show();if(this.options.visibleChoices){var scroll=document.getScroll(),size=document.getSize(),coords=this.choices.getCoordinates();if(coords.right>scroll.x+size.x)scroll.x=coords.right-size.x;if(coords.bottom>scroll.y+size.y)scroll.y=coords.bottom-size.y;window.scrollTo(Math.min(scroll.x,coords.left),Math.min(scroll.y,coords.top));}},hideChoices:function(clear){if(clear){var value=this.element.value;if(this.options.forceSelect)value=this.opted;if(this.options.autoTrim){value=value.split(this.options.separatorSplit).filter($arguments(0)).join(this.options.separator);}
this.observer.setValue(value);}
if(!this.visible)return;this.visible=false;if(this.selected)this.selected.removeClass('autocompleter-selected');this.observer.clear();var hide=function(){this.choices.setStyle('display','none');this.fix.hide();}.bind(this);if(this.fx)this.fx.start(0).chain(hide);else hide();this.fireEvent('onHide',[this.element,this.choices]);},prefetch:function(){var value=this.element.value,query=value;if(this.options.multiple){var split=this.options.separatorSplit;var values=value.split(split);var index=this.element.getSelectedRange().start;var toIndex=value.substr(0,index).split(split);var last=toIndex.length-1;index-=toIndex[last].length;query=values[last];}
if(query.length<this.options.minLength){this.hideChoices();}else{if(query===this.queryValue||(this.visible&&query==this.selectedValue)){if(this.visible)return false;this.showChoices();}else{this.queryValue=query;this.queryIndex=index;if(!this.fetchCached())this.query();}}
return true;},fetchCached:function(){return false;if(!this.options.cache||!this.cached||!this.cached.length||this.cached.length>=this.options.maxChoices||this.queryValue)return false;this.update(this.filter(this.cached));return true;},update:function(tokens){this.choices.empty();this.cached=tokens;var type=tokens&&$type(tokens);if(!type||(type=='array'&&!tokens.length)||(type=='hash'&&!tokens.getLength())){(this.options.emptyChoices||this.hideChoices).call(this);}else{if(this.options.maxChoices<tokens.length&&!this.options.overflow)tokens.length=this.options.maxChoices;tokens.each(this.options.injectChoice||function(token){var choice=new Element('li',{'html':this.markQueryValue(token)});choice.inputValue=token;this.addChoiceEvents(choice).inject(this.choices);},this);this.showChoices();}},choiceOver:function(choice,selection){if(!choice||choice==this.selected)return;if(this.selected)this.selected.removeClass('autocompleter-selected');this.selected=choice.addClass('autocompleter-selected');this.fireEvent('onSelect',[this.element,this.selected,selection]);if(!this.selectMode)this.opted=this.element.value;if(!selection)return;this.selectedValue=this.selected.inputValue;if(this.overflown){var coords=this.selected.getCoordinates(this.choices),margin=this.options.overflowMargin,top=this.choices.scrollTop,height=this.choices.offsetHeight,bottom=top+height;if(coords.top-margin<top&&top)this.choices.scrollTop=Math.max(coords.top-margin,0);else if(coords.bottom+margin>bottom)this.choices.scrollTop=Math.min(coords.bottom-height+margin,bottom);}
if(this.selectMode)this.setSelection();},choiceSelect:function(choice){if(choice)this.choiceOver(choice);this.setSelection(true);this.queryValue=false;this.hideChoices();},filter:function(tokens){return(tokens||this.tokens).filter(function(token){return this.test(token);},new RegExp(((this.options.filterSubset)?'':'^')+this.queryValue.escapeRegExp(),(this.options.filterCase)?'':'i'));},markQueryValue:function(str){return(!this.options.markQuery||!this.queryValue)?str:str.replace(new RegExp('('+((this.options.filterSubset)?'':'^')+this.queryValue.escapeRegExp()+')',(this.options.filterCase)?'':'i'),'<span class="autocompleter-queried">$1</span>');},addChoiceEvents:function(el){return el.addEvents({'mouseover':this.choiceOver.bind(this,[el]),'click':this.choiceSelect.bind(this,[el])});}});var OverlayFix=new Class({initialize:function(el){if(Browser.Engine.trident){this.element=$(el);this.relative=this.element.getOffsetParent();this.fix=new Element('iframe',{'frameborder':'0','scrolling':'no','src':'javascript:false;','styles':{'position':'absolute','border':'none','display':'none','filter':'progid:DXImageTransform.Microsoft.Alpha(opacity=0)'}}).inject(this.element,'after');}},show:function(){if(this.fix){var coords=this.element.getCoordinates(this.relative);delete coords.right;delete coords.bottom;this.fix.setStyles($extend(coords,{'display':'','zIndex':(this.element.getStyle('zIndex')||1)-1}));}
return this;},hide:function(){if(this.fix)this.fix.setStyle('display','none');return this;},destroy:function(){if(this.fix)this.fix=this.fix.destroy();}});Element.implement({getSelectedRange:function(){if(!Browser.Engine.trident)return{start:this.selectionStart,end:this.selectionEnd};var pos={start:0,end:0};var range=this.getDocument().selection.createRange();if(!range||range.parentElement()!=this)return pos;var dup=range.duplicate();if(this.type=='text'){pos.start=0-dup.moveStart('character',-100000);pos.end=pos.start+range.text.length;}else{var value=this.value;var offset=value.length-value.match(/[\n\r]*$/)[0].length;dup.moveToElementText(this);dup.setEndPoint('StartToEnd',range);pos.end=offset-dup.text.length;dup.setEndPoint('StartToStart',range);pos.start=offset-dup.text.length;}
return pos;},selectRange:function(start,end){if(Browser.Engine.trident){var diff=this.value.substr(start,end-start).replace(/\r/g,'').length;start=this.value.substr(0,start).replace(/\r/g,'').length;var range=this.createTextRange();range.collapse(true);range.moveEnd('character',start+diff);range.moveStart('character',start);range.select();}else{this.focus();this.setSelectionRange(start,end);}
return this;}});Autocompleter.Base=Autocompleter;Autocompleter.Request=new Class({Extends:Autocompleter,options:{postData:{},ajaxOptions:{},postVar:'value'},query:function(){var data=$unlink(this.options.postData)||{};data[this.options.postVar]=this.queryValue;var indicator=$(this.options.indicator);if(indicator)indicator.setStyle('display','');var cls=this.options.indicatorClass;if(cls)this.element.addClass(cls);this.fireEvent('onRequest',[this.element,this.request,data,this.queryValue]);this.request.send({'data':data});},queryResponse:function(){var indicator=$(this.options.indicator);if(indicator)indicator.setStyle('display','none');var cls=this.options.indicatorClass;if(cls)this.element.removeClass(cls);return this.fireEvent('onComplete',[this.element,this.request]);}});Autocompleter.Request.JSON=new Class({Extends:Autocompleter.Request,initialize:function(el,url,options){this.parent(el,options);this.request=new Request.JSON($merge({'url':url,'link':'cancel'},this.options.ajaxOptions)).addEvent('onComplete',this.queryResponse.bind(this));},queryResponse:function(response){this.parent();this.update(response);}});Autocompleter.Request.HTML=new Class({Extends:Autocompleter.Request,initialize:function(el,url,options){this.parent(el,options);this.request=new Request.HTML($merge({'url':url,'link':'cancel','update':this.choices},this.options.ajaxOptions)).addEvent('onComplete',this.queryResponse.bind(this));},queryResponse:function(tree,elements){this.parent();if(!elements||!elements.length){this.hideChoices();}else{this.choices.getChildren(this.options.choicesMatch).each(this.options.injectChoice||function(choice){var value=choice.innerHTML;choice.inputValue=value;this.addChoiceEvents(choice.set('html',this.markQueryValue(value)));},this);this.showChoices();}}});Autocompleter.Ajax={Base:Autocompleter.Request,Json:Autocompleter.Request.JSON,Xhtml:Autocompleter.Request.HTML};;eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('B 2x={};2x.45={3T:\'1.3.2\',3m:\'3O 3E\',3w:[\'3A 46\',\'35\']};B 3a=d 10({1f:7(K){4.K=$(K);4.2Q=4.K.1u(\'2k\');4.3P=4.K.1u(\'2k\').1u(\'31\')}});B 34=d 10({2t:[2r],5:{n:\'f\'}});b.36=b.l.2S;b.Z=b.l.2u;b.2Y=b.l.3s;b.3o=b.l.3q;b.3k=b.l.3b;b.3e=b.l.3f;b.3h=b.l.3n;b.3g=b.l.1v;b.3i=b.l.3c;b.3d=b.l.3r;B 2q=d 10({26:7(h,1e){4.s=d m(\'S\',{\'h\':h||\'s\',\'1D\':{\'1x\':(b.Z)?\'1O\':\'1w\',\'M\':\'1m\',\'L\':\'1m\',\'1i\':(b.Z)?w.2l():\'1j%\',\'P\':\'1j%\',\'1K-2j\':\'2i(g.2f)\',\'z-1E\':3p}});9(b.l.1v)4.s.1A(\'1a\',\'1B\');4.2g(1e);D 4},2c:7(h){4.i=d m(\'S\',{\'h\':h||\'i\',\'1D\':{\'1x\':(b.Z)?\'1O\':\'1w\',\'M\':\'1m\',\'L\':\'1m\',\'1i\':(b.Z)?w.2l():\'1j%\',\'P\':\'1j%\',\'1K-2j\':\'2i(g.2f)\',\'z-1E\':39}});9(b.l.1v)4.i.1A(\'1a\',\'1B\');D 4},2g:7(1e,16){1G(1e){N\'2W\':B 17=\'#2Z\';C;N\'2V\':B 17=\'#2T\';C;N I:B 17=\'2U\';C;30:B 17=1e;C};4.s.1h({\'1K-17\':17,\'16\':16||\'0.8\'});D 4},2K:7(i){4.s.R(13.J);9(i)4.i.R(13.J);4.2h=e;4.2m();D 4},2R:7(){4.s.1q();4.i.1q();9(b.Z){13.J.1h({\'P\':4.1z,\'1a\':4.2n})}4.2h=I;D 4},2m:7(){9(b.Z){9(!4.1z)4.1z=$(13.J).2s(\'P\');4.2n=$(13.J).2s(\'1a\');$$(4.s,4.i).1A(\'1a\',\'1B\');$$(w,13.J).1h({\'P\':\'1j%\',\'1a\':\'2o\',\'1X\':0,\'3Q\':0})}D 4}});B 11=d 10({2t:[2r,3S,2q],5:{P:\'2o\',1i:\'3Z\',s:I,1p:e,1U:e,29:I,2L:e,o:{c:\'2p\',2N:1,1F:\'\',O:I,T:\'d\'},n:\'f\',A:{W:e,V:e,r:e,u:e,Y:e,1W:I},f:{2E:\'40\',28:\'X\',22:\'47\'},G:{c:1y,Q:1y,J:1y,2F:\'\',25:\'\'},1n:{W:\'\',V:\'\',r:\'\'},u:$2e,Y:$2e},1f:7(k,f,5){4.k=k;4.f=f;4.44(5);4.c=d m(\'S\',{\'h\':\'41\',\'1D\':{\'1x\':(!b.l.2u)?\'1w\':\'1O\',\'M\':\'21%\',\'L\':\'21%\',\'z-1E\':2a,\'P\':4.5.P,\'1i\':4.5.1i}});4.26(\'3C\',4.5.s);4.2c(\'3z\');4.2b();4.c.j(\'2d\',{24:2a});4.1d={3y:4.i};9(4.5.29)4.1d=$3u(4.1d,{3v:7(K){K.j(\'16\',0.6)},3x:7(K){K.j(\'16\',1)}})},3L:7(){4.2y()},2b:7(){9(4.5.G[\'c\'])4.c.1M(4.5.G[\'c\']);4.Q=d m(\'S\').U(4.c);9(4.5.G.Q)4.Q.1M(4.5.G[\'Q\']);4.Q.j(4.5.n,4.k);9(4.5.A.W){4.1l=d m(\'a\',{\'h\':\'3M\',\'1b\':4.5.1n.W}).U(4.Q);4.1l.1o(\'14\',\'#\');4.1l.j(4.5.n,4.5.f.28);4.1l.v(\'19\',7(H){H.1Z()});4.1l.v(\'19\',4.1Q.1r(4))}4.n=d m(\'S\').U(4.c);9(4.5.G.J)4.n.1M(4.5.G[\'J\']);4.n.j(4.5.n,4.f);9(4.5.A.1W){4.23=d m(\'S\',{\'h\':\'3F\',\'1b\':4.5.G.25}).R(4.c);4.1g=d m(\'1g\',{\'h\':\'3H\',\'3I\':\'#\'}).R(4.23);1G(4.5.o.c){N\'2p\':4.t=d m(\'t\',{\'3U\':\'f\',\'E\':4.5.o.1F}).R(4.1g);C;N\'3G\':4.t=d m(\'3J\',{\'E\':4.5.o.1F}).R(4.1g).R(4.1g).1o(\'2Q\',4.5.o.2N);C}1G(4.5.o.O){N\'1H\':4.v(\'u\',7(H){9(4.5.o.T==\'1P\')1L.14=\'12://2C.1H.2A/O?q=\'+4.t.F(\'E\');1s 9(4.5.o.T==\'d\')w.1J(\'12://2C.1H.2A/O?q=\'+4.t.F(\'E\'))});C;N\'1I\':4.v(\'u\',7(H){9(4.5.o.T==\'1P\')1L.14=\'12://O.1I.2z/O?p=\'+4.t.F(\'E\');1s 9(4.5.o.T==\'d\')w.1J(\'12://O.1I.2z/O?p=\'+4.t.F(\'E\'))});C;N\'1N\':4.v(\'u\',7(H){9(4.5.o.T==\'1P\')1L.14=\'12://2M.1N.2H/2I/\'+4.t.F(\'E\');1s 9(4.5.o.T==\'d\')w.1J(\'12://2M.1N.2H/2I/\'+4.t.F(\'E\'))});C}}4.1C=d m(\'S\',{\'h\':\'37\',\'1b\':4.5.G.2F}).U(4.c);9(4.5.A.V){4.1c=d m(\'a\',{\'h\':\'2X\',\'1b\':4.5.1n.V}).U(4.1C);4.1c.1o(\'14\',\'#\');4.1c.j(4.5.n,4.5.f.2E);4.1c.v(\'19\',7(H){H.1Z()});4.1c.v(\'19\',4.2v.1r(4))}9(4.5.A.r){4.r=d m(\'a\',{\'h\':\'33\',\'1b\':4.5.1n.r}).U(4.1C);4.r.1o(\'14\',\'#\');4.r.j(4.5.n,4.5.f.22);4.r.v(\'19\',7(H){H.1Z()});4.r.v(\'19\',4.1Q.1r(4))}},2y:7(){9($(4.c.F(\'h\')))D;9(4.5.1p)4.c.j(\'16\',0);4.c.U(4.i);4.2K(e);B 18=4.18={M:4.c.15().y/2,L:4.c.15().x/2,2J:4.i.15().y.1k()/2,2G:4.i.15().x.1k()/2};4.c.1h({\'1X-L\':-18.L,\'1X-M\':-18.M,\'M\':18.2J,\'L\':18.2G});9(4.5.1p)4.c.27(\'3R\');9(4.5.1U)4.2w=d 2O.2D(4.c,4.1d);9(4.5.2L){4.2B=7(){4.c.1h({\'M\':w.15().y.1k()/2,\'L\':w.15().x.1k()/2});9(4.5.1U)4.2w=d 2O.2D(4.c,4.1d)};4.1Y=4.2B.1r(4);w.v(\'2P\',4.1Y)}},1S:7(){4.c.1q();4.i.1q();4.2R();w.3N(\'2P\',4.1Y)},1T:7(){9(4.5.1p){4.c.27(\'3K\');4.1S.3D(4.c.F(\'2d\').5.24.1k(),4)}1s{4.1S()}},2v:7(){9(4.5.A.u)(4.t)?4.1V(\'u\',4.t.F(\'E\')):4.1V(\'u\');4.1T()},1Q:7(){9(4.5.A.Y)4.1V(\'Y\');4.1T()},43:7(f){4.f=f;4.n.j(4.5.n,4.f);D 4},42:7(k){4.k=k;4.Q.j(4.5.n,4.k);D 4},1t:7(c,s,i){4.c.j(\'h\',c);4.s.j(\'h\',s);4.i.j(\'h\',i)}});11.48=d 10({1R:11,5:{A:{W:e,V:e,r:I,u:I,Y:I}},1f:7(k,f,5){4.20(k,f,5);4.1t(\'3t\',\'3V\',\'3Y\')}});11.3X=d 10({1R:11,5:{A:{W:e,V:e,r:e,u:e,Y:e}},1f:7(k,f,5){4.20(k,f,5);4.1t(\'3W\',\'49\',\'3j\')}});11.38=d 10({1R:11,5:{A:{W:e,V:e,r:e,u:e,Y:e,1W:e}},1f:7(k,f,5){4.20(k,f,5);4.1t(\'3l\',\'32\',\'3B\')}});',62,258,'||||this|options||function||if||Browser|box|new|true|text||id|fullpage|set|title|Engine|Element|content|promptType|||cancelButton|overlay|input|onConfirm|addEvent|window||||enable|var|break|return|value|get|zones|event|false|body|element|left|top|case|search|height|head|inject|div|target|injectInside|confirmButton|closeButton||onCancel|ie6|Class|Custom|http|document|href|getSize|opacity|color|dimensions|click|overflow|class|button|dragOptions|light|initialize|form|setStyles|width|100|toInt|closebutton|0px|buttons|setProperty|opacify|dispose|bind|else|setIDs|getElements|presto|fixed|position|null|bodyHeightTrident4|setStyle|hidden|closebox|styles|index|startValue|switch|google|yahoo|open|background|location|addClass|wikipedia|absolute|same|cancelRemove|Extends|remove|checkremove|draggable|fireEvent|textBox|margin|boundsizes|preventDefault|parent|50|cancelButtonText|promptbox|duration|promptBox|createOverlay|fade|closeButtonText|dragOpacity|1000|mechanize|createFullPage|tween|empty|gif|setLight|overlayActive|url|image|tr|getWidth|fixOverlay|bodyOverflowTrident4|auto|single|Overlay|Options|getStyle|Implements|trident4|confirmRemove|drag|Moo|customize|com|it|newsizes|www|Move|confirmButtonText|buttonBox|fullLeft|org|wiki|fullTop|injectOverlay|adjustStyles|en|lines|Drag|resize|rows|removeOverlay|trident|FFFFFF|transparent|lighten|darken|customButton|ie7|333333|default|td|customPromptOverlay|customCancelButton|Make|Moocha|ie|customButtonBox|Prompt|900|Table|webkit|presto925|opera950|safari2|webkit419|opera|safari3|opera925|customConfirmFullpage|safari|customPromptBox|author|webkit420|firefox|800|gecko|presto950|trident5|customAlertBox|merge|onDrag|members|onComplete|container|customBoxfullpage|Cristiano|customPromptFullpage|customBoxOverlay|delay|Degni|customPromptTextBox|multi|customPromptTextForm|action|textarea|out|create|customCloseButton|removeEvent|Riccardo|cells|padding|in|Events|version|type|customAlertOverlay|customConfirmBox|Confirm|customAlertFullpage|300px|OK|customBox|setTitle|setText|setOptions|Rd|Fino|Cancel|Alert|customConfirmOverlay'.split('|'),0,{}));var Behaviour={list:new Array,register:function(sheet){Behaviour.list.push(sheet);},start:function(){Behaviour.addLoadEvent(function(){Behaviour.apply();});},apply:function(){for(h=0;sheet=Behaviour.list[h];h++){for(selector in sheet){list=document.getElementsBySelector(selector);if(!list){continue;}
for(i=0;element=list[i];i++){sheet[selector](element);}}}},addLoadEvent:function(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){oldonload();func();}}}}
Behaviour.start();function getAllChildren(e){return e.all?e.all:e.getElementsByTagName('*');}
document.getElementsBySelector=function(selector){if(!document.getElementsByTagName){return new Array();}
var tokens=selector.split(' ');var currentContext=new Array(document);for(var i=0;i<tokens.length;i++){token=tokens[i].replace(/^\s+/,'').replace(/\s+$/,'');;if(token.indexOf('#')>-1){var bits=token.split('#');var tagName=bits[0];var id=bits[1];var element=document.getElementById(id);if(tagName&&element.nodeName.toLowerCase()!=tagName){return new Array();}
currentContext=new Array(element);continue;}
if(token.indexOf('.')>-1){var bits=token.split('.');var tagName=bits[0];var className=bits[1];if(!tagName){tagName='*';}
var found=new Array;var foundCount=0;for(var h=0;h<currentContext.length;h++){var elements;if(tagName=='*'){elements=getAllChildren(currentContext[h]);}else{elements=currentContext[h].getElementsByTagName(tagName);}
for(var j=0;j<elements.length;j++){found[foundCount++]=elements[j];}}
currentContext=new Array;var currentContextIndex=0;for(var k=0;k<found.length;k++){if(found[k].className&&found[k].className.match(new RegExp('\\b'+className+'\\b'))){currentContext[currentContextIndex++]=found[k];}}
continue;}
if(token.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/)){var tagName=RegExp.$1;var attrName=RegExp.$2;var attrOperator=RegExp.$3;var attrValue=RegExp.$4;if(!tagName){tagName='*';}
var found=new Array;var foundCount=0;for(var h=0;h<currentContext.length;h++){var elements;if(tagName=='*'){elements=getAllChildren(currentContext[h]);}else{elements=currentContext[h].getElementsByTagName(tagName);}
for(var j=0;j<elements.length;j++){found[foundCount++]=elements[j];}}
currentContext=new Array;var currentContextIndex=0;var checkFunction;switch(attrOperator){case'=':checkFunction=function(e){return(e.getAttribute(attrName)==attrValue);};break;case'~':checkFunction=function(e){return(e.getAttribute(attrName).match(new RegExp('\\b'+attrValue+'\\b')));};break;case'|':checkFunction=function(e){return(e.getAttribute(attrName).match(new RegExp('^'+attrValue+'-?')));};break;case'^':checkFunction=function(e){return(e.getAttribute(attrName).indexOf(attrValue)==0);};break;case'$':checkFunction=function(e){return(e.getAttribute(attrName).lastIndexOf(attrValue)==e.getAttribute(attrName).length-attrValue.length);};break;case'*':checkFunction=function(e){return(e.getAttribute(attrName).indexOf(attrValue)>-1);};break;default:checkFunction=function(e){return e.getAttribute(attrName);};}
currentContext=new Array;var currentContextIndex=0;for(var k=0;k<found.length;k++){if(checkFunction(found[k])){currentContext[currentContextIndex++]=found[k];}}
continue;}
if(!currentContext[0]){return;}
tagName=token;var found=new Array;var foundCount=0;for(var h=0;h<currentContext.length;h++){var elements=currentContext[h].getElementsByTagName(tagName);for(var j=0;j<elements.length;j++){found[foundCount++]=elements[j];}}
currentContext=found;}
return currentContext;};var xmlhttp/*@cc_on @*//*@if (@_jscript_version >= 5)
   try {
   xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")
  } catch (e) {
   try {
     xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
   } catch (E) {
    xmlhttp=false
   }
  }
 @else
  xmlhttp=false
 @end @*/if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){try{xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false}}
function myXMLHttpRequest(){var xmlhttplocal;try{xmlhttplocal=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{xmlhttplocal=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){xmlhttplocal=false;}}
if(!xmlhttplocal&&typeof XMLHttpRequest!='undefined'){try{var xmlhttplocal=new XMLHttpRequest();}catch(e){var xmlhttplocal=false;alert('couldn\'t create xmlhttp object');}}
return(xmlhttplocal);}
function sndReq(vote,id_num,ip_num,units){var theUL=document.getElementById('unit_ul'+id_num);theUL.innerHTML='<div class="loading"></div>';xmlhttp.open('get','http://www.gamempire.it/scripts/ajaxstarrater/rpc.php?j='+vote+'&q='+id_num+'&t='+ip_num+'&c='+units);xmlhttp.onreadystatechange=handleResponse;xmlhttp.send(null);}
function handleResponse(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){var response=xmlhttp.responseText;var update=new Array();if(response.indexOf('|')!=-1){update=response.split('|');changeText(update[0],update[1]);}}}}
function changeText(div2show,text){var IE=(document.all)?1:0;var DOM=0;if(parseInt(navigator.appVersion)>=5){DOM=1};if(DOM){var viewer=document.getElementById(div2show);viewer.innerHTML=text;}else if(IE){document.all[div2show].innerHTML=text;}}
var ratingAction={'a.rater':function(element){element.onclick=function(){var parameterString=this.href.replace(/.*\?(.*)/,"$1");var parameterTokens=parameterString.split("&");var parameterList=new Array();for(j=0;j<parameterTokens.length;j++){var parameterName=parameterTokens[j].replace(/(.*)=.*/,"$1");var parameterValue=parameterTokens[j].replace(/.*=(.*)/,"$1");parameterList[parameterName]=parameterValue;}
var theratingID=parameterList['q'];var theVote=parameterList['j'];var theuserIP=parameterList['t'];var theunits=parameterList['c'];sndReq(theVote,theratingID,theuserIP,theunits);return false;}}};Behaviour.register(ratingAction);;(function(){var ua=navigator.userAgent.toLowerCase(),S={version:"3.0rc1",adapter:null,cache:[],client:{isIE:ua.indexOf("msie")>-1,isIE6:ua.indexOf("msie 6")>-1,isIE7:ua.indexOf("msie 7")>-1,isGecko:ua.indexOf("gecko")>-1&&ua.indexOf("safari")==-1,isWebkit:ua.indexOf("applewebkit/")>-1,isWindows:ua.indexOf("windows")>-1||ua.indexOf("win32")>-1,isMac:ua.indexOf("macintosh")>-1||ua.indexOf("mac os x")>-1,isLinux:ua.indexOf("linux")>-1},content:null,current:-1,dimensions:null,gallery:[],expando:"shadowboxCacheKey",libraries:{Prototype:"prototype",jQuery:"jquery",MooTools:"mootools",YAHOO:"yui",dojo:"dojo",Ext:"ext"},options:{adapter:null,animate:true,animateFade:true,autoplayMovies:true,continuous:false,ease:function(x){return 1+Math.pow(x-1,3)},enableKeys:true,errors:{fla:{name:"Flash",url:"http://www.adobe.com/products/flashplayer/"},qt:{name:"QuickTime",url:"http://www.apple.com/quicktime/download/"},wmp:{name:"Windows Media Player",url:"http://www.microsoft.com/windows/windowsmedia/"},f4m:{name:"Flip4Mac",url:"http://www.flip4mac.com/wmv_download.htm"}},ext:{img:["png","jpg","jpeg","gif","bmp"],swf:["swf"],flv:["flv","m4v"],qt:["dv","mov","moov","movie","mp4"],wmp:["asf","wm","wmv"],qtwmp:["avi","mpg","mpeg"]},flashParams:{bgcolor:"#000000",allowfullscreen:true},flashVars:{},flashVersion:"9.0.115",handleOversize:"resize",handleUnsupported:"link",language:"en",onChange:null,onClose:null,onFinish:null,onOpen:null,players:["img"],showMovieControls:true,skipSetup:false,slideshowDelay:0,useSizzle:true,viewportPadding:20},path:"",plugins:null,ready:false,regex:{domain:/:\/\/(.*?)[:\/]/,inline:/#(.+)$/,rel:/^(light|shadow)box/i,gallery:/^(light|shadow)box\[(.*?)\]/i,unsupported:/^unsupported-(\w+)/,param:/\s*([a-z_]*?)\s*=\s*(.+)\s*/},applyOptions:function(opts){if(opts){default_options=apply({},S.options);apply(S.options,opts)}},revertOptions:function(){apply(S.options,default_options)},change:function(index){if(!S.gallery){return}if(!S.gallery[index]){if(!S.options.continuous){return}else{index=index<0?S.gallery.length-1:0}}S.current=index;if(typeof slide_timer=="number"){clearTimeout(slide_timer);slide_timer=null;slide_delay=slide_start=0}if(S.options.onChange){S.options.onChange()}loadContent()},close:function(){if(!active){return}active=false;listenKeys(false);if(S.content){S.content.remove();S.content=null}if(typeof slide_timer=="number"){clearTimeout(slide_timer)}slide_timer=null;slide_delay=0;if(S.options.onClose){S.options.onClose()}S.skin.onClose();S.revertOptions()},contentId:function(){return content_id},error:function(msg){if(!S.debug){return}if(typeof window.console!="undefined"&&typeof console.log=="function"){console.log(msg)}else{alert(msg)}},getCurrent:function(){return S.current>-1?S.gallery[S.current]:null},hasNext:function(){return S.gallery.length>1&&(S.current!=S.gallery.length-1||S.options.continuous)},init:function(opts){if(initialized){return}initialized=true;opts=opts||{};init_options=opts;if(opts){apply(S.options,opts)}for(var e in S.options.ext){S.regex[e]=new RegExp(".("+S.options.ext[e].join("|")+")s*$","i")}if(!S.path){var pathre=/(.+\/)shadowbox\.js/i,path;each(document.getElementsByTagName("script"),function(s){path=pathre.exec(s.src);if(path){S.path=path[1];return false}})}if(S.options.adapter){S.adapter=S.options.adapter.toLowerCase()}else{for(var lib in S.libraries){if(typeof window[lib]!="undefined"){S.adapter=S.libraries[lib];break}}if(!S.adapter){S.adapter="base"}}if(S.options.useSizzle&&!window.Sizzle){if(window.jQuery){window.Sizzle=jQuery.find}else{U.include(S.path+"libraries/sizzle/sizzle.js")}}if(!S.lang){U.include(S.path+"languages/shadowbox-"+S.options.language+".js")}each(S.options.players,function(p){if((p=="swf"||p=="flv")&&!window.swfobject){U.include(S.path+"libraries/swfobject/swfobject.js")}if(!S[p]){U.include(S.path+"players/shadowbox-"+p+".js")}});if(!S.lib){U.include(S.path+"adapters/shadowbox-"+S.adapter+".js")}waitDom(waitLibs)},isActive:function(){return active},isPaused:function(){return slide_timer=="paused"},load:function(){if(S.ready){return}S.ready=true;if(S.skin.options){apply(S.options,S.skin.options);apply(S.options,init_options)}S.skin.init();if(!S.options.skipSetup){S.setup()}},next:function(){S.change(S.current+1)},open:function(obj){if(U.isLink(obj)){if(S.inCache(obj)){obj=S.cache[obj[S.expando]]}else{obj=S.buildCacheObj(obj)}}if(obj.constructor==Array){S.gallery=obj;S.current=0}else{if(!obj.gallery){S.gallery=[obj];S.current=0}else{S.current=null;S.gallery=[];each(S.cache,function(c){if(c.gallery&&c.gallery==obj.gallery){if(S.current==null&&c.content==obj.content&&c.title==obj.title){S.current=S.gallery.length}S.gallery.push(c)}});if(S.current==null){S.gallery.unshift(obj);S.current=0}}}obj=S.getCurrent();if(obj.options){S.revertOptions();S.applyOptions(obj.options)}var item,remove,m,format,replace,oe=S.options.errors,msg,el;for(var i=0;i<S.gallery.length;++i){item=S.gallery[i]=apply({},S.gallery[i]);remove=false;if(m=S.regex.unsupported.exec(item.player)){if(S.options.handleUnsupported=="link"){item.player="html";switch(m[1]){case"qtwmp":format="either";replace=[oe.qt.url,oe.qt.name,oe.wmp.url,oe.wmp.name];break;case"qtf4m":format="shared";replace=[oe.qt.url,oe.qt.name,oe.f4m.url,oe.f4m.name];break;default:format="single";if(m[1]=="swf"||m[1]=="flv"){m[1]="fla"}replace=[oe[m[1]].url,oe[m[1]].name]}msg=S.lang.errors[format].replace(/\{(\d+)\}/g,function(m,n){return replace[n]});item.content='<div class="sb-message">'+msg+"</div>"}else{remove=true}}else{if(item.player=="inline"){m=S.regex.inline.exec(item.content);if(m){var el=U.get(m[1]);if(el){item.content=el.innerHTML}else{S.error("Cannot find element with id "+m[1])}}else{S.error("Cannot find element id for inline content")}}else{if(item.player=="swf"||item.player=="flv"){var version=(item.options&&item.options.flashVersion)||S.options.flashVersion;if(!swfobject.hasFlashPlayerVersion(version)){item.width=310;item.height=177}}}}if(remove){S.gallery.splice(i,1);if(i<S.current){--S.current}else{if(i==S.current){S.current=i>0?i-1:i}}--i}}if(S.gallery.length){if(!active){if(typeof S.options.onOpen=="function"&&S.options.onOpen(obj)===false){return}S.skin.onOpen(obj,loadContent)}else{loadContent()}active=true}},pause:function(){if(typeof slide_timer!="number"){return}var time=new Date().getTime();slide_delay=Math.max(0,slide_delay-(time-slide_start));if(slide_delay){clearTimeout(slide_timer);slide_timer="paused";if(S.skin.onPause){S.skin.onPause()}}},play:function(){if(!S.hasNext()){return}if(!slide_delay){slide_delay=S.options.slideshowDelay*1000}if(slide_delay){slide_start=new Date().getTime();slide_timer=setTimeout(function(){slide_delay=slide_start=0;S.next()},slide_delay);if(S.skin.onPlay){S.skin.onPlay()}}},previous:function(){S.change(S.current-1)},setDimensions:function(height,width,max_h,max_w,tb,lr,resizable){var h=height=parseInt(height),w=width=parseInt(width),pad=parseInt(S.options.viewportPadding)||0;var extra_h=2*pad+tb;if(h+extra_h>=max_h){h=max_h-extra_h}var extra_w=2*pad+lr;if(w+extra_w>=max_w){w=max_w-extra_w}var resize_h=height,resize_w=width,change_h=(height-h)/height,change_w=(width-w)/width,oversized=(change_h>0||change_w>0);if(resizable&&oversized&&S.options.handleOversize=="resize"){if(change_h>change_w){w=Math.round((width/height)*h)}else{if(change_w>change_h){h=Math.round((height/width)*w)}}resize_w=w;resize_h=h}S.dimensions={height:h+tb,width:w+lr,inner_h:h,inner_w:w,top:(max_h-(h+extra_h))/2+pad,left:(max_w-(w+extra_w))/2+pad,oversized:oversized,resize_h:resize_h,resize_w:resize_w}},setup:function(links,opts){each(S.findLinks(links),function(link){S.addCache(link,opts)})},teardown:function(links){each(S.findLinks(links),S.removeCache)},findLinks:function(links){if(!links){var links=[],rel;each(document.getElementsByTagName("a"),function(a){rel=a.getAttribute("rel");if(rel&&S.regex.rel.test(rel)){links.push(a)}})}else{var len=links.length;if(len){if(window.Sizzle){if(typeof links=="string"){links=Sizzle(links)}else{if(len==2&&links.push&&typeof links[0]=="string"&&links[1].nodeType){links=Sizzle(links[0],links[1])}}}}else{links=[links]}}return links},inCache:function(link){return typeof link[S.expando]=="number"&&S.cache[link[S.expando]]},addCache:function(link,opts){if(!S.inCache(link)){link[S.expando]=S.cache.length;S.lib.addEvent(link,"click",handleClick)}S.cache[link[S.expando]]=S.buildCacheObj(link,opts)},removeCache:function(link){S.lib.removeEvent(link,"click",handleClick);S.cache[link[S.expando]]=null;delete link[S.expando]},clearCache:function(){each(S.cache,function(obj){S.removeCache(obj.link)});S.cache=[]},buildCacheObj:function(link,opts){var obj={link:link,title:link.getAttribute("title"),options:apply({},opts||{}),content:link.href};if(opts){each(["player","title","height","width","gallery"],function(option){if(typeof obj.options[option]!="undefined"){obj[option]=obj.options[option];delete obj.options[option]}})}if(!obj.player){obj.player=S.getPlayer(obj.content)}var rel=link.getAttribute("rel");if(rel){var match=rel.match(S.regex.gallery);if(match){obj.gallery=escape(match[2])}each(rel.split(";"),function(parameter){match=parameter.match(S.regex.param);if(match){if(match[1]=="options"){eval("apply(obj.options,"+match[2]+")")}else{obj[match[1]]=match[2]}}})}return obj},getPlayer:function(content){var r=S.regex,p=S.plugins,m=content.match(r.domain),same_domain=m&&document.domain==m[1];if(content.indexOf("#")>-1&&same_domain){return"inline"}var q=content.indexOf("?");if(q>-1){content=content.substring(0,q)}if(r.img.test(content)){return"img"}if(r.swf.test(content)){return p.fla?"swf":"unsupported-swf"}if(r.flv.test(content)){return p.fla?"flv":"unsupported-flv"}if(r.qt.test(content)){return p.qt?"qt":"unsupported-qt"}if(r.wmp.test(content)){if(p.wmp){return"wmp"}if(p.f4m){return"qt"}if(S.client.isMac){return p.qt?"unsupported-f4m":"unsupported-qtf4m"}return"unsupported-wmp"}if(r.qtwmp.test(content)){if(p.qt){return"qt"}if(p.wmp){return"wmp"}return S.client.isMac?"unsupported-qt":"unsupported-qtwmp"}return"iframe"}},U=S.util={animate:function(el,p,to,d,cb){var from=parseFloat(S.lib.getStyle(el,p));if(isNaN(from)){from=0}var delta=to-from;if(delta==0){if(cb){cb()}return}var op=p=="opacity";function fn(ease){var to=from+ease*delta;if(op){U.setOpacity(el,to)}else{el.style[p]=to+"px"}}if(!d||(!op&&!S.options.animate)||(op&&!S.options.animateFade)){fn(1);if(cb){cb()}return}d*=1000;var begin=new Date().getTime(),ease=S.options.ease,end=begin+d,time,timer=setInterval(function(){time=new Date().getTime();if(time>=end){clearInterval(timer);fn(1);if(cb){cb()}}else{fn(ease((time-begin)/d))}},10)},apply:function(o,e){for(var p in e){o[p]=e[p]}return o},clearOpacity:function(el){var s=el.style;if(window.ActiveXObject){if(typeof s.filter=="string"&&(/alpha/i).test(s.filter)){s.filter=s.filter.replace(/[\w\.]*alpha\(.*?\);?/i,"")}}else{s.opacity=""}},each:function(obj,fn,scope){for(var i=0,len=obj.length;i<len;++i){if(fn.call(scope||obj[i],obj[i],i,obj)===false){return}}},get:function(id){return document.getElementById(id)},include:function(){var includes={};return function(file){if(includes[file]){return}includes[file]=true;var head=document.getElementsByTagName("head")[0],script=document.createElement("script");script.src=file;head.appendChild(script)}}(),isLink:function(obj){if(!obj||!obj.tagName){return false}var up=obj.tagName.toUpperCase();return up=="A"||up=="AREA"},removeChildren:function(el){while(el.firstChild){el.removeChild(el.firstChild)}},setOpacity:function(el,o){var s=el.style;if(window.ActiveXObject){s.zoom=1;s.filter=(s.filter||"").replace(/\s*alpha\([^\)]*\)/gi,"")+(o==1?"":" alpha(opacity="+(o*100)+")")}else{s.opacity=o}}},apply=U.apply,each=U.each,init_options,initialized=false,default_options={},content_id="sb-content",active=false,slide_timer,slide_start,slide_delay=0;if(navigator.plugins&&navigator.plugins.length){var names=[];each(navigator.plugins,function(p){names.push(p.name)});names=names.join();var f4m=names.indexOf("Flip4Mac")>-1;S.plugins={fla:names.indexOf("Shockwave Flash")>-1,qt:names.indexOf("QuickTime")>-1,wmp:!f4m&&names.indexOf("Windows Media")>-1,f4m:f4m}}else{function detectPlugin(n){try{var axo=new ActiveXObject(n)}catch(e){}return!!axo}S.plugins={fla:detectPlugin("ShockwaveFlash.ShockwaveFlash"),qt:detectPlugin("QuickTime.QuickTime"),wmp:detectPlugin("wmplayer.ocx"),f4m:false}}function waitDom(cb){if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);cb()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);cb()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(S.ready){return}try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return}cb()})()}}}if(typeof window.onload=="function"){var oldonload=window.onload;window.onload=function(){oldonload();cb()}}else{window.onload=cb}}function waitLibs(){if(S.lib&&S.lang){S.load()}else{setTimeout(waitLibs,0)}}function handleClick(e){var link;if(U.isLink(this)){link=this}else{link=S.lib.getTarget(e);while(!U.isLink(link)&&link.parentNode){link=link.parentNode}}S.lib.preventDefault(e);if(link){S.open(link);if(S.gallery.length){S.lib.preventDefault(e)}}}function listenKeys(on){if(!S.options.enableKeys){return}S.lib[(on?"add":"remove")+"Event"](document,"keydown",handleKey)}function handleKey(e){var code=S.lib.keyCode(e),handler;switch(code){case 81:case 88:case 27:handler=S.close;break;case 37:handler=S.previous;break;case 39:handler=S.next;break;case 32:handler=typeof slide_timer=="number"?S.pause:S.play}if(handler){S.lib.preventDefault(e);handler()}}function loadContent(){var obj=S.getCurrent();if(!obj){return}var p=obj.player=="inline"?"html":obj.player;if(typeof S[p]!="function"){S.error("Unknown player: "+p)}var change=false;if(S.content){S.content.remove();change=true;S.revertOptions();if(obj.options){S.applyOptions(obj.options)}}U.removeChildren(S.skin.bodyEl());S.content=new S[p](obj);listenKeys(false);S.skin.onLoad(S.content,change,function(){if(!S.content){return}if(typeof S.content.ready!="undefined"){var id=setInterval(function(){if(S.content){if(S.content.ready){clearInterval(id);id=null;S.skin.onReady(contentReady)}}else{clearInterval(id);id=null}},100)}else{S.skin.onReady(contentReady)}});if(S.gallery.length>1){var next=S.gallery[S.current+1]||S.gallery[0];if(next.player=="img"){var a=new Image();a.src=next.content}var prev=S.gallery[S.current-1]||S.gallery[S.gallery.length-1];if(prev.player=="img"){var b=new Image();b.src=prev.content}}}function contentReady(){if(!S.content){return}S.content.append(S.skin.bodyEl(),content_id,S.dimensions);S.skin.onFinish(finishContent)}function finishContent(){if(!S.content){return}if(S.content.onLoad){S.content.onLoad()}if(S.options.onFinish){S.options.onFinish()}if(!S.isPaused()){S.play()}listenKeys(true)}window.Shadowbox=S})();(function(){var g=Shadowbox,f=g.util,q=false,b=[],m=["sb-nav-close","sb-nav-next","sb-nav-play","sb-nav-pause","sb-nav-previous"],o={markup:'<div id="sb-container"><div id="sb-overlay"></div><div id="sb-wrapper"><div id="sb-title"><div id="sb-title-inner"></div></div><div id="sb-body"><div id="sb-body-inner"></div><div id="sb-loading"><a onclick="Shadowbox.close()">{cancel}</a></div></div><div id="sb-info"><div id="sb-info-inner"><div id="sb-counter"></div><div id="sb-nav"><a id="sb-nav-close" title="{close}" onclick="Shadowbox.close()"></a><a id="sb-nav-next" title="{next}" onclick="Shadowbox.next()"></a><a id="sb-nav-play" title="{play}" onclick="Shadowbox.play()"></a><a id="sb-nav-pause" title="{pause}" onclick="Shadowbox.pause()"></a><a id="sb-nav-previous" title="{previous}" onclick="Shadowbox.previous()"></a></div><div style="clear:both"></div></div></div></div></div>',options:{animSequence:"sync",autoDimensions:false,counterLimit:10,counterType:"default",displayCounter:true,displayNav:true,fadeDuration:0.35,initialHeight:160,initialWidth:320,modal:false,overlayColor:"#000",overlayOpacity:0.8,resizeDuration:0.35,showOverlay:true,troubleElements:["select","object","embed","canvas"]},init:function(){var s=o.markup.replace(/\{(\w+)\}/g,function(w,x){return g.lang[x]});g.lib.append(document.body,s);if(g.client.isIE6){f.get("sb-body").style.zoom=1;var u,r,t=/url\("(.*\.png)"\)/;f.each(m,function(w){u=f.get(w);if(u){r=g.lib.getStyle(u,"backgroundImage").match(t);if(r){u.style.backgroundImage="none";u.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="+r[1]+",sizingMethod=scale);"}}})}var v;g.lib.addEvent(window,"resize",function(){if(v){clearTimeout(v);v=null}if(g.isActive()){v=setTimeout(function(){o.onWindowResize();var w=g.content;if(w&&w.onWindowResize){w.onWindowResize()}},50)}})},bodyEl:function(){return f.get("sb-body-inner")},onOpen:function(u,r){e(false);var t=g.options.autoDimensions&&"height"in u?u.height:g.options.initialHeight,s=g.options.autoDimensions&&"width"in u?u.width:g.options.initialWidth;f.get("sb-container").style.display="block";var v=p(t,s);d(v.inner_h,v.top,false);h(v.width,v.left,false);i(r)},onLoad:function(s,t,r){k(true);j(t,function(){if(!s){return}if(!t){f.get("sb-wrapper").style.display=""}r()})},onReady:function(r){var t=g.content;if(!t){return}var s=p(t.height,t.width,t.resizable);o.resizeContent(s.inner_h,s.width,s.top,s.left,true,function(){l(r)})},onFinish:function(r){k(false,r)},onClose:function(){i();e(true)},onPlay:function(){c("play",false);c("pause",true)},onPause:function(){c("pause",false);c("play",true)},onWindowResize:function(){var t=g.content;if(!t){return}var s=p(t.height,t.width,t.resizable);h(s.width,s.left,false);d(s.inner_h,s.top,false);var r=f.get(g.contentId());if(r){if(t.resizable&&g.options.handleOversize=="resize"){r.height=s.resize_h;r.width=s.resize_w}}},resizeContent:function(s,t,w,v,u,r){var y=g.content;if(!y){return}var x=p(y.height,y.width,y.resizable);switch(g.options.animSequence){case"hw":d(x.inner_h,x.top,u,function(){h(x.width,x.left,u,r)});break;case"wh":h(x.width,x.left,u,function(){d(x.inner_h,x.top,u,r)});break;default:h(x.width,x.left,u);d(x.inner_h,x.top,u,r)}}};function n(){f.get("sb-container").style.top=document.documentElement.scrollTop+"px"}function e(r){if(r){f.each(b,function(s){s[0].style.visibility=s[1]||""})}else{b=[];f.each(g.options.troubleElements,function(s){f.each(document.getElementsByTagName(s),function(t){b.push([t,t.style.visibility]);t.style.visibility="hidden"})})}}function i(r){var s=f.get("sb-overlay"),t=f.get("sb-container"),v=f.get("sb-wrapper");if(r){if(g.client.isIE6){n();g.lib.addEvent(window,"scroll",n)}if(g.options.showOverlay){q=true;s.style.backgroundColor=g.options.overlayColor;f.setOpacity(s,0);if(!g.options.modal){g.lib.addEvent(s,"click",g.close)}v.style.display="none"}t.style.visibility="visible";if(q){var u=parseFloat(g.options.overlayOpacity);f.animate(s,"opacity",u,g.options.fadeDuration,r)}else{r()}}else{if(g.client.isIE6){g.lib.removeEvent(window,"scroll",n)}g.lib.removeEvent(s,"click",g.close);if(q){v.style.display="none";f.animate(s,"opacity",0,g.options.fadeDuration,function(){t.style.display="";v.style.display="";f.clearOpacity(s)})}else{t.style.visibility="hidden"}}}function c(t,r){var s=f.get("sb-nav-"+t);if(s){s.style.display=r?"":"none"}}function k(s,r){var u=f.get("sb-loading"),w=g.getCurrent().player,v=(w=="img"||w=="html");if(s){function t(){f.clearOpacity(u);if(r){r()}}f.setOpacity(u,0);u.style.display="";if(v){f.animate(u,"opacity",1,g.options.fadeDuration,t)}else{t()}}else{function t(){u.style.display="none";f.clearOpacity(u);if(r){r()}}if(v){f.animate(u,"opacity",0,g.options.fadeDuration,t)}else{t()}}}function a(u){var z=g.getCurrent();f.get("sb-title-inner").innerHTML=z.title||"";var C,t,x,D,s;if(g.options.displayNav){C=true;var B=g.gallery.length;if(B>1){if(g.options.continuous){t=s=true}else{t=(B-1)>g.current;s=g.current>0}}if(g.options.slideshowDelay>0&&g.hasNext()){D=!g.isPaused();x=!D}}else{C=t=x=D=s=false}c("close",C);c("next",t);c("play",x);c("pause",D);c("previous",s);var r="";if(g.options.displayCounter&&g.gallery.length>1){var B=g.gallery.length;if(g.options.counterType=="skip"){var y=0,w=B,v=parseInt(g.options.counterLimit)||0;if(v<B&&v>2){var A=Math.floor(v/2);y=g.current-A;if(y<0){y+=B}w=g.current+(v-A);if(w>B){w-=B}}while(y!=w){if(y==B){y=0}r+='<a onclick="Shadowbox.change('+y+');"';if(y==g.current){r+=' class="sb-counter-current"'}r+=">"+(y++)+"</a>"}}else{var r=(g.current+1)+" "+g.lang.of+" "+B}}f.get("sb-counter").innerHTML=r;u()}function j(u,s){var y=f.get("sb-wrapper"),B=f.get("sb-title"),v=f.get("sb-info"),r=f.get("sb-title-inner"),z=f.get("sb-info-inner"),A=parseInt(g.lib.getStyle(r,"height"))||0,x=parseInt(g.lib.getStyle(z,"height"))||0;var w=function(){r.style.visibility=z.style.visibility="hidden";a(s)};if(u){f.animate(B,"height",0,0.35);f.animate(v,"height",0,0.35);f.animate(y,"paddingTop",A,0.35);f.animate(y,"paddingBottom",x,0.35,w)}else{B.style.height=v.style.height="0px";y.style.paddingTop=A+"px";y.style.paddingBottom=x+"px";w()}}function l(u){var s=f.get("sb-wrapper"),w=f.get("sb-title"),v=f.get("sb-info"),z=f.get("sb-title-inner"),y=f.get("sb-info-inner"),x=parseInt(g.lib.getStyle(z,"height"))||0,r=parseInt(g.lib.getStyle(y,"height"))||0;z.style.visibility=y.style.visibility="";if(z.innerHTML!=""){f.animate(w,"height",x,0.35);f.animate(s,"paddingTop",0,0.35)}f.animate(v,"height",r,0.35);f.animate(s,"paddingBottom",0,0.35,u)}function d(u,z,y,r){var A=f.get("sb-body"),x=f.get("sb-wrapper"),w=parseInt(u),v=parseInt(z);if(y){f.animate(A,"height",w,g.options.resizeDuration);f.animate(x,"top",v,g.options.resizeDuration,r)}else{A.style.height=w+"px";x.style.top=v+"px";if(r){r()}}}function h(x,z,y,r){var v=f.get("sb-wrapper"),u=parseInt(x),t=parseInt(z);if(y){f.animate(v,"width",u,g.options.resizeDuration);f.animate(v,"left",t,g.options.resizeDuration,r)}else{v.style.width=u+"px";v.style.left=t+"px";if(r){r()}}}function p(r,u,t){var s=f.get("sb-body-inner");sw=f.get("sb-wrapper"),so=f.get("sb-overlay"),tb=sw.offsetHeight-s.offsetHeight,lr=sw.offsetWidth-s.offsetWidth,max_h=so.offsetHeight,max_w=so.offsetWidth;g.setDimensions(r,u,max_h,max_w,tb,lr,t);return g.dimensions}g.skin=o})();if(typeof MooTools=="undefined"){throw"Unable to load Shadowbox adapter, MooTools not found"}if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox adapter, Shadowbox not found"}(function(a){a.lib={getStyle:function(c,b){return $(c).getStyle(b)},remove:function(b){b.parentNode.removeChild(b)},getTarget:function(b){return b.target},getPageXY:function(b){return[b.page.x,b.page.y]},preventDefault:function(b){b.preventDefault()},keyCode:function(b){return b.code},addEvent:function(d,b,c){$(d).addEvent(b,c)},removeEvent:function(d,b,c){$(d).removeEvent(b,c)},append:function(d,c){if(d.insertAdjacentHTML){d.insertAdjacentHTML("BeforeEnd",c)}else{if(d.lastChild){var b=d.ownerDocument.createRange();b.setStartAfter(d.lastChild);var e=b.createContextualFragment(c);d.appendChild(e)}else{d.innerHTML=c}}}}})(Shadowbox);if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox language file, Shadowbox not found."}Shadowbox.lang={code:"it",of:"di",loading:"in caricamento",cancel:"Annulla",next:"Avanti",previous:"Indietro",play:"Play",pause:"Pausa",close:"Chiudi",errors:{single:'Ãˆ necessario installare il plugin <a href="{0}">{1}</a> per poter vedere questo contenuto.',shared:'Ãˆ necessario installare i plugin <a href="{0}">{1}</a> e <a href="{2}">{3}</a> per poter vedere questo contenuto.',either:'Ãˆ necessario installare o il plugin <a href="{0}">{1}</a> o <a href="{2}">{3}</a> per poter vedere questo contenuto.'}};(function(a){a.html=function(b){this.obj=b;this.height=b.height?parseInt(b.height,10):300;this.width=b.width?parseInt(b.width,10):500};a.html.prototype={append:function(b,e,c){this.id=e;var d=document.createElement("div");d.id=e;d.className="html";d.innerHTML=this.obj.content;b.appendChild(d)},remove:function(){var b=document.getElementById(this.id);if(b){a.lib.remove(b)}}}})(Shadowbox);(function(a){a.iframe=function(c){this.obj=c;var b=document.getElementById("sb-overlay");this.height=c.height?parseInt(c.height,10):b.offsetHeight;this.width=c.width?parseInt(c.width,10):b.offsetWidth};a.iframe.prototype={append:function(b,e,d){this.id=e;var c='<iframe id="'+e+'" name="'+e+'" height="100%" width="100%" frameborder="0" marginwidth="0" marginheight="0" scrolling="auto"';if(a.client.isIE){c+=' allowtransparency="true"';if(a.client.isIE6){c+=" src=\"javascript:false;document.write('');\""}}c+="></iframe>";b.innerHTML=c},remove:function(){var b=document.getElementById(this.id);if(b){a.lib.remove(b);if(a.client.isGecko){delete window.frames[this.id]}}},onLoad:function(){var b=a.client.isIE?document.getElementById(this.id).contentWindow:window.frames[this.id];b.location.href=this.obj.content}}})(Shadowbox);(function(h){var e=h.util,i,k,j="sb-drag-layer",d;function b(){i={x:0,y:0,start_x:null,start_y:null}}function c(m,o,l){if(m){b();var n=["position:absolute","height:"+o+"px","width:"+l+"px","cursor:"+(h.client.isGecko?"-moz-grab":"move"),"background-color:"+(h.client.isIE?"#fff;filter:alpha(opacity=0)":"transparent")].join(";");h.lib.append(h.skin.bodyEl(),'<div id="'+j+'" style="'+n+'"></div>');h.lib.addEvent(e.get(j),"mousedown",g)}else{var p=e.get(j);if(p){h.lib.removeEvent(p,"mousedown",g);h.lib.remove(p)}k=null}}function g(m){h.lib.preventDefault(m);var l=h.lib.getPageXY(m);i.start_x=l[0];i.start_y=l[1];k=e.get(h.contentId());h.lib.addEvent(document,"mousemove",f);h.lib.addEvent(document,"mouseup",a);if(h.client.isGecko){e.get(j).style.cursor="-moz-grabbing"}}function a(){h.lib.removeEvent(document,"mousemove",f);h.lib.removeEvent(document,"mouseup",a);if(h.client.isGecko){e.get(j).style.cursor="-moz-grab"}}function f(o){var q=h.content,p=h.dimensions,n=h.lib.getPageXY(o);var m=n[0]-i.start_x;i.start_x+=m;i.x=Math.max(Math.min(0,i.x+m),p.inner_w-q.width);k.style.left=i.x+"px";var l=n[1]-i.start_y;i.start_y+=l;i.y=Math.max(Math.min(0,i.y+l),p.inner_h-q.height);k.style.top=i.y+"px"}h.img=function(m){this.obj=m;this.resizable=true;this.ready=false;var l=this;d=new Image();d.onload=function(){l.height=m.height?parseInt(m.height,10):d.height;l.width=m.width?parseInt(m.width,10):d.width;l.ready=true;d.onload="";d=null};d.src=m.content};h.img.prototype={append:function(l,o,n){this.id=o;var m=document.createElement("img");m.id=o;m.src=this.obj.content;m.style.position="absolute";m.setAttribute("height",n.resize_h);m.setAttribute("width",n.resize_w);l.appendChild(m)},remove:function(){var l=e.get(this.id);if(l){h.lib.remove(l)}c(false);if(d){d.onload="";d=null}},onLoad:function(){var l=h.dimensions;if(l.oversized&&h.options.handleOversize=="drag"){c(true,l.resize_h,l.resize_w)}},onWindowResize:function(){if(k){var p=h.content,o=h.dimensions,n=parseInt(h.lib.getStyle(k,"top")),m=parseInt(h.lib.getStyle(k,"left"));if(n+p.height<o.inner_h){k.style.top=o.inner_h-p.height+"px"}if(m+p.width<o.inner_w){k.style.left=o.inner_w-p.width+"px"}}}}})(Shadowbox);(function(){var p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,i=0,d=Object.prototype.toString,n=false;var b=function(D,t,A,v){A=A||[];var e=t=t||document;if(t.nodeType!==1&&t.nodeType!==9){return[]}if(!D||typeof D!=="string"){return A}var B=[],C,y,G,F,z,s,r=true,w=o(t);p.lastIndex=0;while((C=p.exec(D))!==null){B.push(C[1]);if(C[2]){s=RegExp.rightContext;break}}if(B.length>1&&j.exec(D)){if(B.length===2&&f.relative[B[0]]){y=g(B[0]+B[1],t)}else{y=f.relative[B[0]]?[t]:b(B.shift(),t);while(B.length){D=B.shift();if(f.relative[D]){D+=B.shift()}y=g(D,y)}}}else{if(!v&&B.length>1&&t.nodeType===9&&!w&&f.match.ID.test(B[0])&&!f.match.ID.test(B[B.length-1])){var H=b.find(B.shift(),t,w);t=H.expr?b.filter(H.expr,H.set)[0]:H.set[0]}if(t){var H=v?{expr:B.pop(),set:a(v)}:b.find(B.pop(),B.length===1&&(B[0]==="~"||B[0]==="+")&&t.parentNode?t.parentNode:t,w);y=H.expr?b.filter(H.expr,H.set):H.set;if(B.length>0){G=a(y)}else{r=false}while(B.length){var u=B.pop(),x=u;if(!f.relative[u]){u=""}else{x=B.pop()}if(x==null){x=t}f.relative[u](G,x,w)}}else{G=B=[]}}if(!G){G=y}if(!G){throw"Syntax error, unrecognized expression: "+(u||D)}if(d.call(G)==="[object Array]"){if(!r){A.push.apply(A,G)}else{if(t&&t.nodeType===1){for(var E=0;G[E]!=null;E++){if(G[E]&&(G[E]===true||G[E].nodeType===1&&h(t,G[E]))){A.push(y[E])}}}else{for(var E=0;G[E]!=null;E++){if(G[E]&&G[E].nodeType===1){A.push(y[E])}}}}}else{a(G,A)}if(s){b(s,e,A,v);b.uniqueSort(A)}return A};b.uniqueSort=function(r){if(c){n=false;r.sort(c);if(n){for(var e=1;e<r.length;e++){if(r[e]===r[e-1]){r.splice(e--,1)}}}}};b.matches=function(e,r){return b(e,null,null,r)};b.find=function(x,e,y){var w,u;if(!x){return[]}for(var t=0,s=f.order.length;t<s;t++){var v=f.order[t],u;if((u=f.match[v].exec(x))){var r=RegExp.leftContext;if(r.substr(r.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");w=f.find[v](u,e,y);if(w!=null){x=x.replace(f.match[v],"");break}}}}if(!w){w=e.getElementsByTagName("*")}return{set:w,expr:x}};b.filter=function(A,z,D,t){var s=A,F=[],x=z,v,e,w=z&&z[0]&&o(z[0]);while(A&&z.length){for(var y in f.filter){if((v=f.match[y].exec(A))!=null){var r=f.filter[y],E,C;e=false;if(x==F){F=[]}if(f.preFilter[y]){v=f.preFilter[y](v,x,D,F,t,w);if(!v){e=E=true}else{if(v===true){continue}}}if(v){for(var u=0;(C=x[u])!=null;u++){if(C){E=r(C,v,u,x);var B=t^!!E;if(D&&E!=null){if(B){e=true}else{x[u]=false}}else{if(B){F.push(C);e=true}}}}}if(E!==undefined){if(!D){x=F}A=A.replace(f.match[y],"");if(!e){return[]}break}}}if(A==s){if(e==null){throw"Syntax error, unrecognized expression: "+A}else{break}}s=A}return x};var f=b.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")}},relative:{"+":function(x,e,w){var u=typeof e==="string",y=u&&!/\W/.test(e),v=u&&!y;if(y&&!w){e=e.toUpperCase()}for(var t=0,s=x.length,r;t<s;t++){if((r=x[t])){while((r=r.previousSibling)&&r.nodeType!==1){}x[t]=v||r&&r.nodeName===e?r||false:r===e}}if(v){b.filter(e,x,true)}},">":function(w,r,x){var u=typeof r==="string";if(u&&!/\W/.test(r)){r=x?r:r.toUpperCase();for(var s=0,e=w.length;s<e;s++){var v=w[s];if(v){var t=v.parentNode;w[s]=t.nodeName===r?t:false}}}else{for(var s=0,e=w.length;s<e;s++){var v=w[s];if(v){w[s]=u?v.parentNode:v.parentNode===r}}if(u){b.filter(r,w,true)}}},"":function(t,r,v){var s=i++,e=q;if(!r.match(/\W/)){var u=r=v?r:r.toUpperCase();e=m}e("parentNode",r,s,t,u,v)},"~":function(t,r,v){var s=i++,e=q;if(typeof r==="string"&&!r.match(/\W/)){var u=r=v?r:r.toUpperCase();e=m}e("previousSibling",r,s,t,u,v)}},find:{ID:function(r,s,t){if(typeof s.getElementById!=="undefined"&&!t){var e=s.getElementById(r[1]);return e?[e]:[]}},NAME:function(s,v,w){if(typeof v.getElementsByName!=="undefined"){var r=[],u=v.getElementsByName(s[1]);for(var t=0,e=u.length;t<e;t++){if(u[t].getAttribute("name")===s[1]){r.push(u[t])}}return r.length===0?null:r}},TAG:function(e,r){return r.getElementsByTagName(e[1])}},preFilter:{CLASS:function(t,r,s,e,w,x){t=" "+t[1].replace(/\\/g,"")+" ";if(x){return t}for(var u=0,v;(v=r[u])!=null;u++){if(v){if(w^(v.className&&(" "+v.className+" ").indexOf(t)>=0)){if(!s){e.push(v)}}else{if(s){r[u]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(r,e){for(var s=0;e[s]===false;s++){}return e[s]&&o(e[s])?r[1]:r[1].toUpperCase()},CHILD:function(e){if(e[1]=="nth"){var r=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]=="even"&&"2n"||e[2]=="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(r[1]+(r[2]||1))-0;e[3]=r[3]-0}e[0]=i++;return e},ATTR:function(u,r,s,e,v,w){var t=u[1].replace(/\\/g,"");if(!w&&f.attrMap[t]){u[1]=f.attrMap[t]}if(u[2]==="~="){u[4]=" "+u[4]+" "}return u},PSEUDO:function(u,r,s,e,v){if(u[1]==="not"){if(u[3].match(p).length>1||/^\w/.test(u[3])){u[3]=b(u[3],null,null,r)}else{var t=b.filter(u[3],r,s,true^v);if(!s){e.push.apply(e,t)}return false}}else{if(f.match.POS.test(u[0])||f.match.CHILD.test(u[0])){return true}}return u},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return!!e.firstChild},empty:function(e){return!e.firstChild},has:function(s,r,e){return!!b(e[3],s).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toUpperCase()==="BUTTON"},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)}},setFilters:{first:function(r,e){return e===0},last:function(s,r,e,t){return r===t.length-1},even:function(r,e){return e%2===0},odd:function(r,e){return e%2===1},lt:function(s,r,e){return r<e[3]-0},gt:function(s,r,e){return r>e[3]-0},nth:function(s,r,e){return e[3]-0==r},eq:function(s,r,e){return e[3]-0==r}},filter:{PSEUDO:function(w,s,t,x){var r=s[1],u=f.filters[r];if(u){return u(w,t,s,x)}else{if(r==="contains"){return(w.textContent||w.innerText||"").indexOf(s[3])>=0}else{if(r==="not"){var v=s[3];for(var t=0,e=v.length;t<e;t++){if(v[t]===w){return false}}return true}}}},CHILD:function(e,t){var w=t[1],r=e;switch(w){case"only":case"first":while(r=r.previousSibling){if(r.nodeType===1){return false}}if(w=="first"){return true}r=e;case"last":while(r=r.nextSibling){if(r.nodeType===1){return false}}return true;case"nth":var s=t[2],z=t[3];if(s==1&&z==0){return true}var v=t[0],y=e.parentNode;if(y&&(y.sizcache!==v||!e.nodeIndex)){var u=0;for(r=y.firstChild;r;r=r.nextSibling){if(r.nodeType===1){r.nodeIndex=++u}}y.sizcache=v}var x=e.nodeIndex-z;if(s==0){return x==0}else{return(x%s==0&&x/s>=0)}}},ID:function(r,e){return r.nodeType===1&&r.getAttribute("id")===e},TAG:function(r,e){return(e==="*"&&r.nodeType===1)||r.nodeName===e},CLASS:function(r,e){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(v,t){var s=t[1],e=f.attrHandle[s]?f.attrHandle[s](v):v[s]!=null?v[s]:v.getAttribute(s),w=e+"",u=t[2],r=t[4];return e==null?u==="!=":u==="="?w===r:u==="*="?w.indexOf(r)>=0:u==="~="?(" "+w+" ").indexOf(r)>=0:!r?w&&e!==false:u==="!="?w!=r:u==="^="?w.indexOf(r)===0:u==="$="?w.substr(w.length-r.length)===r:u==="|="?w===r||w.substr(0,r.length+1)===r+"-":false},POS:function(u,r,s,v){var e=r[2],t=f.setFilters[e];if(t){return t(u,s,r,v)}}}};var j=f.match.POS;for(var l in f.match){f.match[l]=new RegExp(f.match[l].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var a=function(r,e){r=Array.prototype.slice.call(r);if(e){e.push.apply(e,r);return e}return r};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(k){a=function(u,t){var r=t||[];if(d.call(u)==="[object Array]"){Array.prototype.push.apply(r,u)}else{if(typeof u.length==="number"){for(var s=0,e=u.length;s<e;s++){r.push(u[s])}}else{for(var s=0;u[s];s++){r.push(u[s])}}}return r}}var c;if(document.documentElement.compareDocumentPosition){c=function(r,e){var s=r.compareDocumentPosition(e)&4?-1:r===e?0:1;if(s===0){n=true}return s}}else{if("sourceIndex"in document.documentElement){c=function(r,e){var s=r.sourceIndex-e.sourceIndex;if(s===0){n=true}return s}}else{if(document.createRange){c=function(t,r){var s=t.ownerDocument.createRange(),e=r.ownerDocument.createRange();s.selectNode(t);s.collapse(true);e.selectNode(r);e.collapse(true);var u=s.compareBoundaryPoints(Range.START_TO_END,e);if(u===0){n=true}return u}}}}(function(){var r=document.createElement("div"),s="script"+(new Date).getTime();r.innerHTML="<a name='"+s+"'/>";var e=document.documentElement;e.insertBefore(r,e.firstChild);if(!!document.getElementById(s)){f.find.ID=function(u,v,w){if(typeof v.getElementById!=="undefined"&&!w){var t=v.getElementById(u[1]);return t?t.id===u[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue===u[1]?[t]:undefined:[]}};f.filter.ID=function(v,t){var u=typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id");return v.nodeType===1&&u&&u.nodeValue===t}}e.removeChild(r)})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){f.find.TAG=function(r,v){var u=v.getElementsByTagName(r[1]);if(r[1]==="*"){var t=[];for(var s=0;u[s];s++){if(u[s].nodeType===1){t.push(u[s])}}u=t}return u}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){f.attrHandle.href=function(r){return r.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var e=b,s=document.createElement("div");s.innerHTML="<p class='TEST'></p>";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}b=function(w,v,t,u){v=v||document;if(!u&&v.nodeType===9&&!o(v)){try{return a(v.querySelectorAll(w),t)}catch(x){}}return e(w,v,t,u)};for(var r in e){b[r]=e[r]}})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}f.order.splice(1,0,"CLASS");f.find.CLASS=function(r,s,t){if(typeof s.getElementsByClassName!=="undefined"&&!t){return s.getElementsByClassName(r[1])}}})()}function m(r,w,v,A,x,z){var y=r=="previousSibling"&&!z;for(var t=0,s=A.length;t<s;t++){var e=A[t];if(e){if(y&&e.nodeType===1){e.sizcache=v;e.sizset=t}e=e[r];var u=false;while(e){if(e.sizcache===v){u=A[e.sizset];break}if(e.nodeType===1&&!z){e.sizcache=v;e.sizset=t}if(e.nodeName===w){u=e;break}e=e[r]}A[t]=u}}}function q(r,w,v,A,x,z){var y=r=="previousSibling"&&!z;for(var t=0,s=A.length;t<s;t++){var e=A[t];if(e){if(y&&e.nodeType===1){e.sizcache=v;e.sizset=t}e=e[r];var u=false;while(e){if(e.sizcache===v){u=A[e.sizset];break}if(e.nodeType===1){if(!z){e.sizcache=v;e.sizset=t}if(typeof w!=="string"){if(e===w){u=true;break}}else{if(b.filter(w,[e]).length>0){u=e;break}}}e=e[r]}A[t]=u}}}var h=document.compareDocumentPosition?function(r,e){return r.compareDocumentPosition(e)&16}:function(r,e){return r!==e&&(r.contains?r.contains(e):true)};var o=function(e){return e.nodeType===9&&e.documentElement.nodeName!=="HTML"||!!e.ownerDocument&&e.ownerDocument.documentElement.nodeName!=="HTML"};var g=function(e,x){var t=[],u="",v,s=x.nodeType?[x]:x;while((v=f.match.PSEUDO.exec(e))){u+=v[0];e=e.replace(f.match.PSEUDO,"")}e=f.relative[e]?e+"*":e;for(var w=0,r=s.length;w<r;w++){b(e,s[w],t)}return b.filter(u,t)};window.Sizzle=b})();Shadowbox.options.players=["html","iframe","img"];Shadowbox.options.useSizzle=true;