// MooTools: the javascript framework. // Load this file's selection again by visiting: http://mootools.net/more/41bf71222b4f33eb05ed3bb26be5553a // Or build this file again with packager using: packager build More/More More/Fx.Elements More/Fx.Accordion More/Fx.Scroll More/Fx.Slide More/Drag More/Drag.Move More/Assets More/Scroller More/Tips /* --- copyrights: - [MooTools](http://mootools.net) licenses: - [MIT License](http://mootools.net/license.txt) ... */ MooTools.More={version:"1.4.0.1",build:"a4244edf2aa97ac8a196fc96082dd35af1abab87"};Fx.Elements=new Class({Extends:Fx.CSS,initialize:function(b,a){this.elements=this.subject=$$(b); this.parent(a);},compute:function(g,h,j){var c={};for(var d in g){var a=g[d],e=h[d],f=c[d]={};for(var b in a){f[b]=this.parent(a[b],e[b],j);}}return c; },set:function(b){for(var c in b){if(!this.elements[c]){continue;}var a=b[c];for(var d in a){this.render(this.elements[c],d,a[d],this.options.unit);}}return this; },start:function(c){if(!this.check(c)){return this;}var h={},j={};for(var d in c){if(!this.elements[d]){continue;}var f=c[d],a=h[d]={},g=j[d]={};for(var b in f){var e=this.prepare(this.elements[d],b,f[b]); a[b]=e.from;g[b]=e.to;}}return this.parent(h,j);}});Fx.Accordion=new Class({Extends:Fx.Elements,options:{fixedHeight:false,fixedWidth:false,display:0,show:false,height:true,width:false,opacity:true,alwaysHide:false,trigger:"click",initialDisplayFx:true,resetHeight:true},initialize:function(){var g=function(h){return h!=null; };var f=Array.link(arguments,{container:Type.isElement,options:Type.isObject,togglers:g,elements:g});this.parent(f.elements,f.options);var b=this.options,e=this.togglers=$$(f.togglers); this.previous=-1;this.internalChain=new Chain();if(b.alwaysHide){this.options.link="chain";}if(b.show||this.options.show===0){b.display=false;this.previous=b.show; }if(b.start){b.display=false;b.show=false;}var d=this.effects={};if(b.opacity){d.opacity="fullOpacity";}if(b.width){d.width=b.fixedWidth?"fullWidth":"offsetWidth"; }if(b.height){d.height=b.fixedHeight?"fullHeight":"scrollHeight";}for(var c=0,a=e.length;c=0?a-1:0)).chain(d);}else{d();}return this;},detach:function(b){var a=function(c){c.removeEvent(this.options.trigger,c.retrieve("accordion:display")); }.bind(this);if(!b){this.togglers.each(a);}else{a(b);}return this;},display:function(b,c){if(!this.check(b,c)){return this;}var h={},g=this.elements,a=this.options,f=this.effects; if(c==null){c=true;}if(typeOf(b)=="element"){b=g.indexOf(b);}if(b==this.previous&&!a.alwaysHide){return this;}if(a.resetHeight){var e=g[this.previous]; if(e&&!this.selfHidden){for(var d in f){e.setStyle(d,e[f[d]]);}}}if((this.timer&&a.link=="chain")||(b===this.previous&&!a.alwaysHide)){return this;}this.previous=b; this.selfHidden=false;g.each(function(l,k){h[k]={};var j;if(k!=b){j=true;}else{if(a.alwaysHide&&((l.offsetHeight>0&&a.height)||l.offsetWidth>0&&a.width)){j=true; this.selfHidden=true;}}this.fireEvent(j?"background":"active",[this.togglers[k],l]);for(var m in f){h[k][m]=j?0:l[f[m]];}if(!c&&!j&&a.resetHeight){h[k].height="auto"; }},this);this.internalChain.clearChain();this.internalChain.chain(function(){if(a.resetHeight&&!this.selfHidden){var i=g[b];if(i){i.setStyle("height","auto"); }}}.bind(this));return c?this.start(h):this.set(h).internalChain.callChain();}});(function(){Fx.Scroll=new Class({Extends:Fx,options:{offset:{x:0,y:0},wheelStops:true},initialize:function(c,b){this.element=this.subject=document.id(c); this.parent(b);if(typeOf(this.element)!="element"){this.element=document.id(this.element.getDocument().body);}if(this.options.wheelStops){var d=this.element,e=this.cancel.pass(false,this); this.addEvent("start",function(){d.addEvent("mousewheel",e);},true);this.addEvent("complete",function(){d.removeEvent("mousewheel",e);},true);}},set:function(){var b=Array.flatten(arguments); if(Browser.firefox){b=[Math.round(b[0]),Math.round(b[1])];}this.element.scrollTo(b[0],b[1]);return this;},compute:function(d,c,b){return[0,1].map(function(e){return Fx.compute(d[e],c[e],b); });},start:function(c,d){if(!this.check(c,d)){return this;}var b=this.element.getScroll();return this.parent([b.x,b.y],[c,d]);},calculateScroll:function(g,f){var d=this.element,b=d.getScrollSize(),h=d.getScroll(),j=d.getSize(),c=this.options.offset,i={x:g,y:f}; for(var e in i){if(!i[e]&&i[e]!==0){i[e]=h[e];}if(typeOf(i[e])!="number"){i[e]=b[e]-j[e];}i[e]+=c[e];}return[i.x,i.y];},toTop:function(){return this.start.apply(this,this.calculateScroll(false,0)); },toLeft:function(){return this.start.apply(this,this.calculateScroll(0,false));},toRight:function(){return this.start.apply(this,this.calculateScroll("right",false)); },toBottom:function(){return this.start.apply(this,this.calculateScroll(false,"bottom"));},toElement:function(d,e){e=e?Array.from(e):["x","y"];var c=a(this.element)?{x:0,y:0}:this.element.getScroll(); var b=Object.map(document.id(d).getPosition(this.element),function(g,f){return e.contains(f)?g+c[f]:false;});return this.start.apply(this,this.calculateScroll(b.x,b.y)); },toElementEdge:function(d,g,e){g=g?Array.from(g):["x","y"];d=document.id(d);var i={},f=d.getPosition(this.element),j=d.getSize(),h=this.element.getScroll(),b=this.element.getSize(),c={x:f.x+j.x,y:f.y+j.y}; ["x","y"].each(function(k){if(g.contains(k)){if(c[k]>h[k]+b[k]){i[k]=c[k]-b[k];}if(f[k]this.options.snap){this.cancel();this.document.addEvents({mousemove:this.bound.drag,mouseup:this.bound.stop}); this.fireEvent("start",[this.element,a]).fireEvent("snap",this.element);}},drag:function(b){var a=this.options;if(a.preventDefault){b.preventDefault(); }this.mouse.now=b.page;for(var c in a.modifiers){if(!a.modifiers[c]){continue;}this.value.now[c]=this.mouse.now[c]-this.mouse.pos[c];if(a.invert){this.value.now[c]*=-1; }if(a.limit&&this.limit[c]){if((this.limit[c][1]||this.limit[c][1]===0)&&(this.value.now[c]>this.limit[c][1])){this.value.now[c]=this.limit[c][1];}else{if((this.limit[c][0]||this.limit[c][0]===0)&&(this.value.now[c]d.left&&b.xd.top);},this).getLast();if(this.overed!=a){if(this.overed){this.fireEvent("leave",[this.element,this.overed]); }if(a){this.fireEvent("enter",[this.element,a]);}this.overed=a;}},drag:function(a){this.parent(a);if(this.options.checkDroppables&&this.droppables.length){this.checkDroppables(); }},stop:function(a){this.checkDroppables();this.fireEvent("drop",[this.element,this.overed,a]);this.overed=null;return this.parent(a);}});Element.implement({makeDraggable:function(a){var b=new Drag.Move(this,a); this.store("dragger",b);return b;}});var Asset={javascript:function(d,b){if(!b){b={};}var a=new Element("script",{src:d,type:"text/javascript"}),e=b.document||document,c=b.onload||b.onLoad; delete b.onload;delete b.onLoad;delete b.document;if(c){if(typeof a.onreadystatechange!="undefined"){a.addEvent("readystatechange",function(){if(["loaded","complete"].contains(this.readyState)){c.call(this); }});}else{a.addEvent("load",c);}}return a.set(b).inject(e.head);},css:function(d,a){if(!a){a={};}var b=new Element("link",{rel:"stylesheet",media:"screen",type:"text/css",href:d}); var c=a.onload||a.onLoad,e=a.document||document;delete a.onload;delete a.onLoad;delete a.document;if(c){b.addEvent("load",c);}return b.set(a).inject(e.head); },image:function(c,b){if(!b){b={};}var d=new Image(),a=document.id(d)||new Element("img");["load","abort","error"].each(function(e){var g="on"+e,f="on"+e.capitalize(),h=b[g]||b[f]||function(){}; delete b[f];delete b[g];d[g]=function(){if(!d){return;}if(!a.parentNode){a.width=d.width;a.height=d.height;}d=d.onload=d.onabort=d.onerror=null;h.delay(1,a,a); a.fireEvent(e,a,1);};});d.src=a.src=c;if(d&&d.complete){d.onload.delay(1);}return a.set(b);},images:function(c,b){c=Array.from(c);var d=function(){},a=0; b=Object.merge({onComplete:d,onProgress:d,onError:d,properties:{}},b);return new Elements(c.map(function(f,e){return Asset.image(f,Object.append(b.properties,{onload:function(){a++; b.onProgress.call(this,a,e,f);if(a==c.length){b.onComplete();}},onerror:function(){a++;b.onError.call(this,a,e,f);if(a==c.length){b.onComplete();}}})); }));}};var Scroller=new Class({Implements:[Events,Options],options:{area:20,velocity:1,onChange:function(a,b){this.element.scrollTo(a,b);},fps:50},initialize:function(b,a){this.setOptions(a); this.element=document.id(b);this.docBody=document.id(this.element.getDocument().body);this.listener=(typeOf(this.element)!="element")?this.docBody:this.element; this.timer=null;this.bound={attach:this.attach.bind(this),detach:this.detach.bind(this),getCoords:this.getCoords.bind(this)};},start:function(){this.listener.addEvents({mouseover:this.bound.attach,mouseleave:this.bound.detach}); return this;},stop:function(){this.listener.removeEvents({mouseover:this.bound.attach,mouseleave:this.bound.detach});this.detach();this.timer=clearInterval(this.timer); return this;},attach:function(){this.listener.addEvent("mousemove",this.bound.getCoords);},detach:function(){this.listener.removeEvent("mousemove",this.bound.getCoords); this.timer=clearInterval(this.timer);},getCoords:function(a){this.page=(this.listener.get("tag")=="body")?a.client:a.page;if(!this.timer){this.timer=this.scroll.periodical(Math.round(1000/this.options.fps),this); }},scroll:function(){var c=this.element.getSize(),a=this.element.getScroll(),h=this.element!=this.docBody?this.element.getOffsets():{x:0,y:0},d=this.element.getScrollSize(),g={x:0,y:0},e=this.options.area.top||this.options.area,b=this.options.area.bottom||this.options.area; for(var f in this.page){if(this.page[f]<(e+h[f])&&a[f]!=0){g[f]=(this.page[f]-e-h[f])*this.options.velocity;}else{if(this.page[f]+b>(c[f]+h[f])&&a[f]+c[f]!=d[f]){g[f]=(this.page[f]-c[f]+b-h[f])*this.options.velocity; }}g[f]=g[f].round();}if(g.y||g.x){this.fireEvent("change",[a.x+g.x,a.y+g.y]);}}});(function(){var a=function(c,b){return(c)?(typeOf(c)=="function"?c(b):b.get(c)):""; };this.Tips=new Class({Implements:[Events,Options],options:{onShow:function(){this.tip.setStyle("display","block");},onHide:function(){this.tip.setStyle("display","none"); },title:"title",text:function(b){return b.get("rel")||b.get("href");},showDelay:100,hideDelay:100,className:"tip-wrap",offset:{x:16,y:16},windowPadding:{x:0,y:0},fixed:false,waiAria:true},initialize:function(){var b=Array.link(arguments,{options:Type.isObject,elements:function(c){return c!=null; }});this.setOptions(b.options);if(b.elements){this.attach(b.elements);}this.container=new Element("div",{"class":"tip"});if(this.options.id){this.container.set("id",this.options.id); if(this.options.waiAria){this.attachWaiAria();}}},toElement:function(){if(this.tip){return this.tip;}this.tip=new Element("div",{"class":this.options.className,styles:{position:"absolute",top:0,left:0}}).adopt(new Element("div",{"class":"tip-top"}),this.container,new Element("div",{"class":"tip-bottom"})); return this.tip;},attachWaiAria:function(){var b=this.options.id;this.container.set("role","tooltip");if(!this.waiAria){this.waiAria={show:function(c){if(b){c.set("aria-describedby",b); }this.container.set("aria-hidden","false");},hide:function(c){if(b){c.erase("aria-describedby");}this.container.set("aria-hidden","true");}};}this.addEvents(this.waiAria); },detachWaiAria:function(){if(this.waiAria){this.container.erase("role");this.container.erase("aria-hidden");this.removeEvents(this.waiAria);}},attach:function(b){$$(b).each(function(d){var f=a(this.options.title,d),e=a(this.options.text,d); d.set("title","").store("tip:native",f).retrieve("tip:title",f);d.retrieve("tip:text",e);this.fireEvent("attach",[d]);var c=["enter","leave"];if(!this.options.fixed){c.push("move"); }c.each(function(h){var g=d.retrieve("tip:"+h);if(!g){g=function(i){this["element"+h.capitalize()].apply(this,[i,d]);}.bind(this);}d.store("tip:"+h,g).addEvent("mouse"+h,g); },this);},this);return this;},detach:function(b){$$(b).each(function(d){["enter","leave","move"].each(function(e){d.removeEvent("mouse"+e,d.retrieve("tip:"+e)).eliminate("tip:"+e); });this.fireEvent("detach",[d]);if(this.options.title=="title"){var c=d.retrieve("tip:native");if(c){d.set("title",c);}}},this);return this;},elementEnter:function(c,b){clearTimeout(this.timer); this.timer=(function(){this.container.empty();["title","text"].each(function(e){var d=b.retrieve("tip:"+e);var f=this["_"+e+"Element"]=new Element("div",{"class":"tip-"+e}).inject(this.container); if(d){this.fill(f,d);}},this);this.show(b);this.position((this.options.fixed)?{page:b.getPosition()}:c);}).delay(this.options.showDelay,this);},elementLeave:function(c,b){clearTimeout(this.timer); this.timer=this.hide.delay(this.options.hideDelay,this,b);this.fireForParent(c,b);},setTitle:function(b){if(this._titleElement){this._titleElement.empty(); this.fill(this._titleElement,b);}return this;},setText:function(b){if(this._textElement){this._textElement.empty();this.fill(this._textElement,b);}return this; },fireForParent:function(c,b){b=b.getParent();if(!b||b==document.body){return;}if(b.retrieve("tip:enter")){b.fireEvent("mouseenter",c);}else{this.fireForParent(c,b); }},elementMove:function(c,b){this.position(c);},position:function(f){if(!this.tip){document.id(this);}var c=window.getSize(),b=window.getScroll(),g={x:this.tip.offsetWidth,y:this.tip.offsetHeight},d={x:"left",y:"top"},e={y:false,x2:false,y2:false,x:false},h={}; for(var i in d){h[d[i]]=f.page[i]+this.options.offset[i];if(h[d[i]]<0){e[i]=true;}if((h[d[i]]+g[i]-b[i])>c[i]-this.options.windowPadding[i]){h[d[i]]=f.page[i]-this.options.offset[i]-g[i]; e[i+"2"]=true;}}this.fireEvent("bound",e);this.tip.setStyles(h);},fill:function(b,c){if(typeof c=="string"){b.set("html",c);}else{b.adopt(c);}},show:function(b){if(!this.tip){document.id(this); }if(!this.tip.getParent()){this.tip.inject(document.body);}this.fireEvent("show",[this.tip,b]);},hide:function(b){if(!this.tip){document.id(this);}this.fireEvent("hide",[this.tip,b]); }});})(); // var du fichier agplayer.js var song_en_cours = 1; var volumeencours = localStorage['volumeencours']; if(volumeencours == undefined) volumeencours = 0.75; var fx_defile; var interval; var defile_id3; //////////////////////////////////// var sz = 0; var song = 1; var sonencours = 0; var ancre = ''; var strUrlImg = ''; var savehisto; var popup; var popup2; var popup3; var envoyage; var coucher; var size = 0; var zoom_page_personne; var lecture = 0; var sizerie = localStorage['sizerie']; if(sizerie == undefined) sizerie = 16; var inittips; var firefox; /**************************************/ window.addEvent('domready', function(){ var nompage = [ 'technique', 'ardoise', 'du-son-sur-ses-pages', 'faire-son-swf', 'demo-redimensionner-avant-upload', 'html5-audio-lecteur-flash-js', 'ipcam', 'josepaldir', 'autres', 'mon-nom-est-personne', 'le-donon', 'evolution', 'firefox', 'panneaux-routiers' //'plaidoyer-pour-une-foret-publique', ]; // supprime les images téléchargées par les testeurs new Request.HTML({ url: 'save_name_up_img.php?renvoi', method: 'get', onSuccess: function(html,b,c) { if(c.trim() != ''){ strUrlImg = c.trim(); traiteSortieRedim(''); } } }).send(); // analyse de l'url var pageencours = location.href.substr(location.href.lastIndexOf('/')+1); // musique y avait-il ? if(localStorage['duree']){ var duree = localStorage['duree']; var song = localStorage['song']; $('odio'+song).onloadedmetadata = function(){ $('odio'+song).currentTime = duree.toInt();} $('odio'+song).volume = volumeencours; $('odio'+song).play(); song_en_cours = song; lecture = 1; } var lienactif = 0; /*** traitement lien actif ***** var lien_actif = function(a){ $('content-menus').getElements('li').removeClass('actif'); a.getParent('li').addClass('actif'); } *** Liens du menu ********* $('content-menus').getElements('a').each(function(a,i){ a.addEvent('click', function(){ if(this.get('text').indexOf('Firefox') != -1){ firefox(); return; } var page = a.getProperty('href'); if(page == '') return false; window.location.hash = '#' + page; lienactif = i; lien_actif(a); change_page(page); return false; }); }); /// même chose sur li ci-dessus $$('.lien').each(function(a,i){ a.addEvent('click', function(){ if(i == 12){ firefox(); return; } var page = a.getElement('a').getProperty('href'); if(page == '') return false; window.location.hash = '#' + page; lienactif = i; lien_actif(a.getElement('a')); change_page(page); return false; }); }); var change_page = function(page){ if($defined($('agplayer2'))) $('agplayer2').destroy(); if($defined($('redim'))){ // on quitte la page demo-redimens.... traiteSortieRedim(href); } if($defined($('ardoisejs'))){ $('ardoisejs').destroy(); $('palette').destroy(); } href = page; pageencours = page; var idx = nompage.indexOf(href); href = href + '.php?ajax=1'; new Request.HTML({ url: href, method: 'get', onSuccess: function(html, xml, zz) { $('contenu-page').set('text', ''); $('contenu-page').adopt(html); if(Browser.Engine.trident && idx == 1) return; //var tt = $('meta').get('text'); //$(document.head).getElement('title').set('text', tt); remonte(); $$('.lien').removeClass('actif'); $$('.lien')[idx-2].addClass('actif'); if(idx == 0){ $('msgw').addEvent('click', function(){ if(this.getStyle('height').toInt() == 22) this.tween('height', 530); else this.tween('height', 22); }); } else if(idx == 1){ var myScript2 = new Asset.javascript('js/ardoise.js', {id: 'ardoisejs'}); } else if(idx == 2){ // du-son-sur-ses-pages init_hp(); initshow(); } else if(idx == 4){ // demo- var myScript = new Asset.javascript('js/redim.js', {id: 'redim'}); placetext1(); } else if(idx == 5){ // html5- var myScript3 = new Asset.javascript('js/agplayer2.js', {id: 'agplayer2'}); inserepeck(); } else if(idx == 6){ // ipcam //var myScript4 = new Asset.javascript('js/ipcam.js', {id: 'ipcamjs'}); } else if(idx == 9){ // personne- lanceson(); zoom_page_personne(); } else if(idx == 10){ //page Donon affminidiapo(); coucher(); } else if(idx == 11){ //page Evolution initzoomevo(); } else if(idx == 13){ initpanos(); } initchamps(); inittips(); } }).send(); } ******************************/ //position du soleil var posx = 832/1011; var posy = 310/478; /****************************** player son réglé par agplayer.js *******************************/ var fxplay1, fxplay2; $('container-player').setStyles({'top': 0, 'left': -80}); //($(document.body).getSize().y / 2) - 160 var togglehp = 0; $('hpplayer').addEvent('click', function(){ if(togglehp){ togglehp = 0; this.setStyle('background-position', 'right -96px'); //this.setProperty('title', 'Laisser ouvert'); this.store('tip:title', 'laisser ouvert'); //inittips(); } else { togglehp = 1; this.setStyle('background-position', 'right -150px'); this.store('tip:title', 'refermer'); //inittips(); } }); $('container-player').addEvents({ 'mouseenter': function(){ if($defined(fxplay2)) fxplay2.cancel(); if(!togglehp) fxplay1 = new Fx.Tween(this).start('left', 0); }, 'mouseleave': function(){ if($defined(fxplay1)) fxplay1.cancel(); if(!togglehp) fxplay2 = new Fx.Tween(this).start('left', -80); } }); /******************************/ $('a-plus'). addEvent('click', function(){ sizerie += 2; $('contenu-page').setStyle('font-size', sizerie); if($defined($('foret'))) $('foret').setStyle('font-size', sizerie); }); $('a-moins').addEvent('click', function(){ sizerie -= 2; $('contenu-page').setStyle('font-size', sizerie); if($defined($('foret'))) $('foret').setStyle('font-size', sizerie); }); /******************************/ /******************************/ $('contenu-page').setStyle('font-size', sizerie); /******************************/ var initshow = function(){ /* $('divshow').addEvent('click', function(){ var div = $('contentdivhidden'); if(div.getStyle('height') != 'auto') div.setStyles({'height': 'auto', 'overflow': 'auto'}); else div.setStyles({'height': 10, 'overflow': 'hidden'}); }); */ } /******************************/ var lanceson = function(){ if($defined(lecture)){ if(lecture) return; else { lecture = 1; song_en_cours = 1; $('odio' + song_en_cours).volume = volumeencours; $('odio' + song_en_cours).play(); $('bt2').setStyle('background-position', '0px -184px'); } } else lanceson.delay(200); } /*************************************/ $$('.write').addEvent('click', function(){formu(); return false;}); /*************************************/ inittips = function(){ var customTips = $$('.tip'); toolTips = new Tips(customTips, { showDelay: 100, hideDelay: 100, className: 'bulle', offsets: { 'x': 10, //par défaut : 16 'y': 20 //par défaut : 16 }, onShow: function(toolTipElement){ toolTipElement.fade(0.8); }, onHide: function(toolTipElement){ toolTipElement.fade(0); } }); } inittips(); /*********************/ var reinit = function(){ sz = $(document.body).getSize(); } /*********************/ var init = function(){ reinit(); if(!Browser.Engine.trident){ //horloge = $('horloge'); //now(); //aig(); } else { //$('contenthorloge').setStyle('visibility', 'hidden'); } } /*********************/ init(); /*********************/ var remonte = function(){ var myFx = new Fx.Scroll($(document.body), { offset: {'x': 0,'y': 0}, onComplete: function(){} }).toTop(); } /******************/ $$('.cocci').addEvent('click', function(){ remonte(); return false; }); remonte(); /******************/ var toggletableau = 0; /*** animation planète firefox sur josepaldir ***/ firefox = function(){ if(window.location.host == 'localhost') var href = '../josepaldir/planetefirefox/index.php'; else var href = 'http://www.josepaldir.com/planetefirefox/index.php'; popup3 = window.open(href,'firefox','width='+sz.x+',height='+sz.y+',location=0,menubar=0,status=0,scrollbars=0,toolbar=0,left=100,top=0'); return false; } /******************/ var init_hp = function(){ $('haut-parleur').setStyle('cursor', 'pointer').addEvents({ 'mouseenter': function(){ this.fade(1); }, 'mouseleave': function(){ if(!lecture) this.fade(0.4); }, 'click': function(){ if(lecture && song_en_cours == 5){ $('odio5').pause(); lecture = 0; return; } for(i=1; i<=5; i++){ $('odio'+i).pause(); try{ $('odio'+i).currentTime = 0;} catch(e) { } } lecture = 1; song_en_cours = 5; $('odio' + song_en_cours).volume = volumeencours; $('odio' + song_en_cours).play(); defile_id3(); $('bt2').setStyle('background-position', '0px -184px'); this.fade(1); } }); } /******************/ var initup = function(){ $$('.up').addEvent('click', function(){ remonte(); return false; }); } /******************/ var effettexte = function(){ var chaine = 'L\'Evoluton exponentielle'; var lettre = 'E'; var div = new Element('div', {id: 'test'}).addClass('lettre').inject($(document.body)); var span = new Element('span').setStyle('font-size', 14).inject(div); span.set('text', lettre); var fx = new Fx.Tween(span, { duration: 10000, onComplete: function(){ } }).start('font-size', (14*500)); } /**** enregistrement à chaque changement ***/ savehisto = function(){ //var ch = volumeencours; //Cookie.write('ag', ch, {duration: 400}); } /******************/ var traiteSortieRedim = function(href){ //suppression des images téléchargées //la chaine strUrlImg est remplie dans redim.js if(strUrlImg == ''){ return; } new Request.HTML({ url: 'deleteImg.php', method: 'post', onSuccess: function(html, xml, zz) { //if(zz) alert(zz); //strUrlImg = ''; //$('redim').destroy(); //if(href != '') changepage(href); } }).send('str='+strUrlImg); } /******************/ var fermepopups = function(){ if($defined(popup)){ if(!popup.closed) popup.close(); } if($defined(popup2)){ if(!popup2.closed) popup2.close(); } } /*********************/ window.addEvent('resize', reinit); /*********************/ //controlUrl.periodical(200); /***************************************** Page "Mon nom est Personne" *****************************************/ zoom_page_personne = function(){ //init diapo $('contphotos').setStyle('overflow', 'hidden'); $$('.divminidiap2').setStyle('position', 'absolute'); //init hover sur small img $$('.divminidiap2').getElements('img').each(function(a,i){ a.addEvent('mouseenter', function(){ creebigpersonne(i); }); }); //crée les 83 marqueurs $$('.divminidiap2').each(function(a,i){ var div = new Element('div').addClass('lienphoto').setStyle('width', 6).inject($('zonemove')); }) /* evenement wheel sur l'ensemble ***********/ $('contphotos').addEvent('mousewheel', function(e){ e.stop().preventDefault(); var ii = 0; $$('.divminidiap2').each(function(a,i){ if(a.getStyle('z-index') == 100) ii = i; }) $$('.divminidiap2').setStyle('z-index', 1); if(e.wheel > 0) { if(ii == 0) return; $$('.divminidiap2')[ii-1].setStyle('z-index', 100); $$('.lienphoto').setStyle('background-color', 'transparent'); $$('.lienphoto')[ii-1].setStyle('background-color', 'blue'); $('zonecompteur').set('text', (ii) + ' / 83'); } if(e.wheel < 0) { if(ii + 2 == 88) return; $$('.divminidiap2')[ii+1].setStyle('z-index', 100); $$('.lienphoto').setStyle('background-color', 'transparent'); $$('.lienphoto')[ii+1].setStyle('background-color', 'blue'); $('zonecompteur').set('text', (ii+2) + ' / 83'); } }); /* click sur la zone compteur ************/ $('zonecompteur').addEvent('click', function(){ $$('.divminidiap2').each(function(a,i){ if(a.getStyle('z-index') == 100){ creebigpersonne(i); } }) }); /* click sur 1 marqueur bleu **************************/ $$('.lienphoto').each(function(a,i){ a.addEvent('click', function(){ $$('.lienphoto').setStyle('background-color', 'transparent'); a.setStyle('background-color', 'blue'); $$('.divminidiap2').setStyle('z-index', 1); $$('.divminidiap2')[i].setStyle('z-index', 100); }); }); /* affichage par défaut *************************/ $$('.divminidiap2')[41].setStyle('z-index', 100); $$('.lienphoto')[41].setStyle('background-color', 'blue'); } /********************/ var creebigpersonne = function(i){ var src = $$('.divminidiap2')[i].getElement('img').getProperty('src'); src = src.substring(src.length - 7); src = 'minidiap/personne/800/800'+src; var y = $('contphotos').getCoordinates().top - 40; var div = new Element('div', {id: 'bigpersonne'}).addClass('bigpersonne').setStyle('top', y).inject($(document.body)); var img = new Asset.image(src); img.inject(div); var num = i; div.addEvents({ 'click': function(){ div.destroy(); stopmovewheel = 0; $$('.lienphoto').setStyle('background-color', 'transparent'); $$('.lienphoto')[i].setStyle('background-color', 'blue'); }, 'mouseleave': function(){ div.destroy(); stopmovewheel = 0; $$('.lienphoto').setStyle('background-color', 'transparent'); $$('.lienphoto')[num].setStyle('background-color', 'blue'); }, 'mousewheel': function(e){ e.stop().preventDefault(); if(e.wheel > 0) { num --; if(num < 0) num = 82; } if(e.wheel < 0) { num ++; if(num > 82) num = 0; } div.set('text', ''); src = $$('.divminidiap2')[num].getElement('img').getProperty('src'); src = src.substring(src.length - 7); src = 'minidiap/personne/800/800'+src; img = new Asset.image(src); img.inject(div); $$('.divminidiap2').setStyle('z-index', 1); $$('.divminidiap2')[num].setStyle('z-index', 100); $$('.lienphoto').setStyle('background-color', 'transparent'); $$('.lienphoto')[num].setStyle('background-color', 'blue'); //préchargement suivante if(num == 82) num = 0; var src1 = $$('.divminidiap2')[num+1].getElement('img').getProperty('src'); src1 = src1.substring(src1.length - 7); src1 = 'minidiap/personne/800/800'+src1; var img1 = new Asset.image(src1); //préchargement précédente if(num == 0) num = 82; var src2 = $$('.divminidiap2')[num-1].getElement('img').getProperty('src'); src2 = src2.substring(src2.length - 7); src2 = 'minidiap/personne/800/800'+src2; var img2 = new Asset.image(src2); } }); } /********************/ var initzoomevo = function(){ $$('.zoomevo').each(function(a,i){ a.addEvent('click', function(){ var fond = new Element('div', {id: 'fondnoir'}).addClass('fondnoir'); fond.setStyles({ 'opacity': 0, 'width': sz.x, 'height': $(document.body).getScrollSize().y }).inject($(document.body)); fond.fade(0.8); var dim = a.getProperty('rel').split('|'); var src = a.getProperty('src'); var img = new Asset.image(src); var c = a.getCoordinates(); var cont = new Element('div').addClass('contimg').setStyles({ 'left': c.left, 'top': c.top, 'width': c.width, 'height': c.height }).inject($(document.body)); img.inject(cont); new Fx.Morph(cont, { duration: 600, onComplete: function(){ img.addClass('endzoom'); img.addEvent('click', function(){ fond.fade(0); new Fx.Morph(cont, { duration: 600, onComplete: function(){ fond.destroy(); cont.destroy(); } }).start({ 'left': c.left, 'top': c.top, 'width': c.width, 'height': c.height }); }); } }).start({ 'left': (sz.x - dim[0]) / 2, 'top': ((sz.y - dim[1]) / 2) + $(document).getScroll().y, 'width': dim[0], 'height': dim[1] }); fond.addEvent('click', function(){ fond.destroy(); cont.destroy(); }); }); }); } //initzoomevo(); /********************************************************/ /* GALERIE */ /* S'adapte au nombre de photos du répertoire */ /* Dans un premier temps, s'adapte à la hauteur d'écran */ /* Possibilités de zoom avec la roulette et de drag */ /* Défilement avant et arrière. Pas d'auto */ /* Préchargement de l'image suivante */ /* Code gerardal1@free.fr */ /********************************************************/ var dragage = 0; /**************************/ var dimbigimg = function(img){ // pour connaitre les dimension de l'image afin de définir le ratio var temp = new Element('div').addClass('tempimg').inject($(document.body)); img.inject(temp); var w_big = temp.getCoordinates().width; var h_big = temp.getCoordinates().height; temp.destroy(); // on ramène ces dimensions pour tenir dans l'écran en se basant sur la hauteur var dim_ecran = []; dim_ecran[0] = sz.y - 60; var ratio = w_big / h_big; dim_ecran[1] = Math.round(dim_ecran[0] * ratio); return dim_ecran; } /**************************/ // usine à gaz pour page le-donon var minidiap_en_cours = 0; var maxminidiap = 0; /********************/ var affminidiapo = function(){ $$('.mini').each(function(a,i){ // c'est l'image //a.setStyle('opacity', 0.4); a.addEvents({ 'click': function(){ minidiap_en_cours = i; var fond = new Element('div', {id: 'fondnoir'}).addClass('fondnoir').setStyle('opacity', 0.8).inject($(document.body)); var old_src = this.getProperty('src'); var new_src = old_src.replace("scaled/sc_", ''); var imgbig = new Asset.image(new_src, { 'onload': function(){ // pour connaitre les dimension de l'image afin de définir le ratio var dim_ecran = dimbigimg(imgbig); var h_ecran = dim_ecran[0]; var w_ecran = dim_ecran[1]; // position de départ var c = a.getCoordinates(); var divbig = new Element('div', {id: 'divbig'}).addClass('minidiap_big').setStyles({ 'left': c.left, 'top': c.top, 'width': c.width, 'height': c.height }).inject($(document.body)); imgbig.inject(divbig); new Fx.Morph(divbig, { duration: 800, onComplete: function(){ divbig.setStyles({ 'position': 'fixed', 'border': '#000000 2px solid', 'top': 20 }); var nav = new Element('div').addClass('navdiap').inject(divbig); var prev = new Element('span').addClass('prev2').inject(nav); var fermer = new Element('span').addClass('fermer2').inject(prev, 'after'); var next = new Element('span').addClass('next2').inject(fermer, 'after'); var comm = new Element('span').addClass('comm2').inject(next, 'after'); prev.set('html', '◄ '); fermer.set('html', '⊗'); next.set('html', ' ►'); var textcomm = a.getProperty('rel'); comm.set('text', textcomm); fond.fade(0.8); // appelle la suivante next.addEvent('click', function(){ new Fx.Tween(imgbig, { duration: 400, onComplete: function(){ imgbig.destroy(); minidiap_en_cours ++; if(minidiap_en_cours == maxminidiap+1) minidiap_en_cours = 0; old_src = $$('.mini')[minidiap_en_cours].getProperty('src'); new_src = old_src.replace("scaled/sc_", ''); imgbig = new Asset.image(new_src, { 'onload': function(){ textcomm = $$('.mini')[minidiap_en_cours].getProperty('rel'); comm.set('text', '').set('text', textcomm); // pour connaitre les dimension de l'image afin de définir le ratio var dim_ecran = dimbigimg(imgbig); var h_ecran = dim_ecran[0]; var w_ecran = dim_ecran[1]; imgbig.inject(divbig); new Fx.Morph(divbig, { duration: 800, onComplete: function(){ imgbig.addEvent('click', function(){ fermetout(); }); // precharge la suivante var n = minidiap_en_cours + 1; if(n == maxminidiap + 1) n = 0; old_src = $$('.mini')[n].getProperty('src'); new_src = old_src.replace("scaled/sc_", ""); var temp = new Asset.image(new_src); } }).start({ 'left': (sz.x - w_ecran) / 2, 'top': 20 , 'width': w_ecran, 'height': h_ecran }); } }); } }).start('opacity', 0); }); // appelle la précédente prev.addEvent('click', function(){ new Fx.Tween(imgbig, { duration: 400, onComplete: function(){ imgbig.destroy(); minidiap_en_cours --; if(minidiap_en_cours == -1) minidiap_en_cours = maxminidiap; old_src = $$('.mini')[minidiap_en_cours].getProperty('src'); new_src = old_src.replace("scaled/sc_", ""); imgbig = new Asset.image(new_src, { 'onload': function(){ textcomm = $$('.mini')[minidiap_en_cours].getProperty('rel'); comm.set('text', '').set('text', textcomm); // pour connaitre les dimension de l'image afin de définir le ratio var dim_ecran = dimbigimg(imgbig); var h_ecran = dim_ecran[0]; var w_ecran = dim_ecran[1]; imgbig.inject(divbig); new Fx.Morph(divbig, { duration: 800, onComplete: function(){ imgbig.addEvent('click', function(){ fermetout(); }); } }).start({ 'left': (sz.x - w_ecran) / 2, 'top': 20 , 'width': w_ecran, 'height': h_ecran }); } }); } }).start('opacity', 0); }); // ferme tout var fermetout = function(){ if(dragage){ dragage = 0; return; } divbig.destroy(); imgbig.destroy(); $('fondnoir').destroy(); } fermer.addEvent('click', function(){ fermetout(); }); imgbig.addEvent('click', function(){ fermetout(); }); } }).start({ 'left': (sz.x - w_ecran) / 2, 'top': 20 + $(document.body).getScroll().y, 'width': w_ecran, 'height': h_ecran }); divbig.setProperty('title', 'Zoomer (roulette) - Déplacer - Fermer (click)'); var myDrag1 = new Drag.Move(divbig, { handle: divbig, onDrag: function(){ dragage = 1; } }); divbig.addEvents({ 'mousewheel': zoomerie, 'mousedown' : function(){ divbig.setStyle('cursor', 'move'); }, 'mouseup' : function(){ divbig.setStyle('cursor', 'pointer'); } }); } }); $('fondnoir').addEvent('click', function(){ $('fondnoir').destroy(); $('divbig').destroy(); }); return false; }, 'mouseenter': function(){ //a.fade(1); }, 'mouseleave': function(){ //a.fade(0.4); } }); maxminidiap = i; }); } /**** zoomerie ******************/ var zoomerie = function(e){ var c = $('divbig').getCoordinates(); var rap = c.width / c.height; //on flatouille le width if(e.wheel < 0) { //ca maigrit var w = c.width - 60; $('divbig').setStyles({ 'left': c.left + 30, 'top': c.top + (30 / rap), 'width': w, 'height': w / rap }); } if(e.wheel > 0) { //ca grossit var w = c.width + 60; $('divbig').setStyles({ 'left': c.left - 30, 'top': c.top - (30 / rap), 'width': w, 'height': w / rap }); } e.stop().preventDefault(); } /******************/ coucher = function(){ $$('.coucher').setStyle('cursor', 'pointer').addEvent('click',function(){ popup = window.open('dononsoleil.php','dononsol','width=1280,height='+(sz.y - 40)+',location=0,menubar=0,status=0,scrollbars=0,toolbar=0,left=100,top=0'); }); } coucher(); /*********************/ var rotat = function(sens){ if(sens) var d = '-6deg'; else var d = '0deg'; $('tableau').style.MozTransform = $('tableau').style.WebkitTransform = $('tableau').style.OTransform = $('tableau').style.transform = 'rotate('+d+')'; } /********************************/ var initchamps = function(){ $$('.champs').each( function(a,i) { a.addEvents({ 'blur': function(){ if(a.get('value').trim() == ""){ if(i == 0) a.set('value', 'Votre nom'); //if(i == 1) a.set('value', 'Votre email (non publié)'); if(i == 1) a.set('value', 'Votre message'); } }, 'click': function(){ var txt = a.get('value').trim(); if(i == 0 && txt != "" && txt != "Votre nom") return; //if(i == 1 && txt != "" && txt != "Votre email (non publié)") return; if(i == 1 && txt != "" && txt != "Votre message") return; a.set('value', ''); } }); }); } /********************************/ /********************************/ /********************************/ window.addEvent('scroll', function(){ var y = getScrollTop(); if(y > 100){ if($('cocci').hasClass('bouge2')) $('cocci').removeClass('bouge2'); $('cocci').addClass('bouge'); } if(y < 50){ if($('cocci').hasClass('bouge')){ $('cocci').removeClass('bouge'); $('cocci').addClass('bouge2'); } } }); /********************************/ var getScrollTop = function(){ return (document.documentElement && document.documentElement.scrollTop || window.pageYOffset || self.pageYOffset || document.body.scrollTop); } /******************************** window.addEvent('unload', function(){ //alert(strUrlImg); savehisto(); fermepopups(); if(strUrlImg != ""){ traiteSortieRedim('');} var music = $('odio'+song_en_cours).currentTime; if(music != 0){ //alert($('odio'+song_en_cours).currentTime); localStorage['song'] = song_en_cours; localStorage['duree'] = music; } else { localStorage.removeItem('song'); localStorage.removeItem('duree'); } }); ********************************/ var reconnect = false; window.onfocus = function () { if (reconnect) { reconnect = false; //alert("Perform an auto-login here!"); } }; window.onbeforeunload = function () { //logout(); var msg = "zete sur?"; reconnect = true; //return msg; savehisto(); fermepopups(); // l'événement est déclenché lorsque glissé de l'img dans la barre adresse // et comme l'img est supprimée, 404 not found ! //if(strUrlImg != ""){ traiteSortieRedim('');} var music = $('odio'+song_en_cours).currentTime; if(music != 0){ //alert($('odio'+song_en_cours).currentTime); localStorage['song'] = song_en_cours; localStorage['duree'] = music; } else { localStorage.removeItem('song'); localStorage.removeItem('duree'); } }; /********************************/ var msgdespanos = [ 'Un jour, chemin faisant,', 'je rencontrai une dame.', 'Mon sang ne fit qu\'un tour !', 'Je me jetai à l\'eau.', 'Au bout d\'un moment, nous ne pensâmes qu\'à nous évader.', 'Je l\'enmenai dans ma maison ...', 'et la déposai dans mon lit.', '"Je prends la pillule" me dit-elle.', 'J\'avais atteint le point de non retour.', 'Elle écarta d\' abord une jambe,', 'puis les deux.', 'La réaction ne se fit pas attendre.', 'Lorsqu\'elle fut à point,', 'je passai à l\'action.', 'Elle me demanda d\'aller moins vite.', 'Nous essayâmes ensuite ...', 'plusieurs positions.', 'Et après quelques mouvements,', 'elle me fit de modestes commentaires ...', 'sur mon engin !', 'Je lui objectai qu\'elle ne devait plus être vierge !', 'Soudain, elle s\'écria :', 'Danger ! J\'ai menti, je ne prend pas la pillule !', 'Le monde s\'écroula sous mes pieds.', 'Elle me téléphona 9 mois plus tard', 'de la clinique :', 'J\'avais deux gosses !', '... et les ennuis commencèrent !' ]; /********************************/ var initpanos = function(){ $$('.pano').each( function(a,i) { a.addEvents({ 'mouseenter': function(){ if(i > 27) return; $('msgpano').set('text', '').set('text', msgdespanos[i]); $('msgpano').setStyles({ 'left': this.getCoordinates().left-$('pagination').getCoordinates().left, 'top': this.getCoordinates().top - 250, 'visibility': 'visible' }); }, 'mouseleave': function(){ $('msgpano').setStyle('visibility', 'hidden'); } }); }); } /******************************/ /******************************/ /******************************/ /******************************/ if(pageencours == 'du-son-sur-ses-pages') { init_hp(); initshow(); } else if(pageencours == 'mon-nom-est-personne') { lanceson.delay(800); zoom_page_personne(); } else if(pageencours == 'le-donon') { affminidiapo.delay(800); coucher.delay(800); } else if(pageencours == 'evolution') { initzoomevo(); } else if(pageencours == 'plaidoyer-pour-une-foret-publique') { initup(); } else if(pageencours == 'panneaux-routiers') { initpanos(); } /*******************************************************************/ /*******************************************************************/ }); //fin domready /*******************************************************************/ /*******************************************************************/ var tourne, timetourne, timetourne2; var cparti = 0; var dejaopaque = 0; var deg = 0; var tourne2 = function(){ var div9 = $$('.contformu')[0]; div9.style.MozTransform = div9.style.WebkitTransform = div9.style.OTransform = div9.style.transform = 'rotate(' + deg+ 'deg)'; deg+=4; if(deg >= 360){ div9.style.MozTransform = div9.style.WebkitTransform = div9.style.OTransform = div9.style.transform = 'rotate(0deg)'; deg= 0; } else tourne2.delay(10); } /***************************************/ var formu = function(){ var fondmessage = new Element('div', {id: 'fondmessage'}).addClass('fondnoir').setStyle('opacity', 0).inject($(document.body)); fondmessage.setStyle('z-index', 1003); if(fondmessage.getStyle('opacity') != 0) dejaopaque = 1; if($defined($('pagecentrale'))) fondmessage.setStyle('height', $('pagecentrale').getCoordinates().height.toInt()); var divie = new Element('div', {id: 'ie'}).addClass('ie tip').inject($(document.body)); var imgie = new Asset.image('ie.png'); divie.adopt(imgie); divie.setStyle('right', sz.x).setProperty('title', 'Je glisse parce que je ne sais pas rouler !'); inittips(); new Fx.Tween(divie, { duration: 2000, //transition: Fx.Transitions.Elastic.easeOut, onComplete: function(){ /* new Fx.Tween(divie, { duration: 1000, transition: Fx.Transitions.Elastic.easeOut, onComplete: function(){ } }).start('right', (sz.x/2)-220-100); */ } }).start('right', (sz.x/2)-220-100); var tw = new Fx.Tween(fondmessage, { duration: 500, onComplete: function(){ var div = new Element('div').addClass('contformu'); div.inject(document.body); var url = 'formulaire/formulaire.php?racine=1&ajax=1'; var req = new Request.HTML({ url: url, evalScripts: true, method: 'get', onSuccess: function(html) { div.set('html', ''); div.adopt(html); /************************* Périmetre = diamètre * 3.14 soit 440 * 3.14 = 1381.6 1 tour complet = 1381.6 pour 360° soit pour 1° = 1381.6 / 360 = 3.838 degrés nécessaires : -440 jusqu'à (size.x/2 - 220) / 3.838 *************************/ var deplacement = (sz.x /2) - 220; //var deplacement = (sz.x /2) - 220 + 440; var nbrdeg = Math.round(deplacement / 3.838); var departdeg = 360 - nbrdeg; //calage de l'angle de départ deg = departdeg; div.style.MozTransform = div.style.WebkitTransform = div.style.OTransform = div.style.transform = 'rotate('+ deg +'deg)'; // à chaque deg, le div avance de 3.838 var avancee = 3.838; tourne = function(){ div.style.MozTransform = div.style.WebkitTransform = div.style.OTransform = div.style.transform = 'rotate(' + deg+ 'deg)'; var vit = 2; deg += vit; avancee += (3.838 * vit); //div.setStyle('left', -440 + avancee); div.setStyle('left', avancee); if(deg == 22) divie.tween('height', 15); if(deg >= 360){ div.style.MozTransform = div.style.WebkitTransform = div.style.OTransform = div.style.transform = 'rotate(0deg)'; deg= 0;//nbrdeg; //si relance de la fonction pour sortir if(cparti){ var tw00 = new Fx.Tween(fondmessage, { duration: 3000, onComplete: function(){ div.destroy(); divie.destroy(); fondmessage.destroy(); cparti = 0; } }); tw00.start('opacity', 0); } else { // arrivée au milieu } $clear(timetourne); return; } else timetourne = tourne.delay(10); } new Fx.Tween(div, { duration: 1000, transition: Fx.Transitions.Bounce.easeOut, onComplete: function(){ tourne.delay(600); } }).start('top', sz.y - 440); var iptch = ['Votre nom ou pseudo', 'Votre email', 'Sujet', 'Votre message']; $$('.champs2').each( function(a,i) { a.addEvents({ 'blur': function(){ if(a.get('value').trim() == ""){ a.set('value', iptch[i]); } }, 'click': function(){ if(a.get('value').trim() != ""){ if(a.get('value') != iptch[i]) return; else a.set('value', ''); } } }); }); /*************/ $('soumissionirreversiblementexpeditrice').addEvents({ 'mousedown': function(){ this.setStyle('border', 'gray 1px inset'); }, 'mouseup': function(){ this.setStyle('border', 'gray 1px outset'); } }); /***** traitement par appel de resultat.php ******/ var monForm = $('monForm'); monForm.addEvent('submit', function(e){ if(cparti) return; cparti = 1; e.stop(); monForm.set('send', { onSuccess : function(responseText, responseXML){ var ok = responseText; if(ok.indexOf('ok') != -1){ //div.addClass('exped'); $('resultat').set('html', 'Message expédié !'); tourne.delay(2000); } else { //if(ok.indexOf('erreur') != -1) { cparti = 0; if(ok == '') ok = ' '; $('resultat').set('html', ok); //ok contient ... le contraire (responseText) pffff ! tourne2(); } } }); monForm.send(); }); /************/ $$('.closage').addEvent('click', function(){ cparti = 1; tourne(); /*************/ return false; }); }, onFailure: function() { div.set('text', 'Problème, page non chargée.'); } }); req.send(); } }); tw.start('opacity', 0.8); } /* SWFObject v2.0 Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis This software is released under the MIT License */ var swfobject=function(){var Z="undefined",P="object",B="Shockwave Flash",h="ShockwaveFlash.ShockwaveFlash",W="application/x-shockwave-flash",K="SWFObjectExprInst",G=window,g=document,N=navigator,f=[],H=[],Q=null,L=null,T=null,S=false,C=false;var a=function(){var l=typeof g.getElementById!=Z&&typeof g.getElementsByTagName!=Z&&typeof g.createElement!=Z&&typeof g.appendChild!=Z&&typeof g.replaceChild!=Z&&typeof g.removeChild!=Z&&typeof g.cloneNode!=Z,t=[0,0,0],n=null;if(typeof N.plugins!=Z&&typeof N.plugins[B]==P){n=N.plugins[B].description;if(n){n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1");t[0]=parseInt(n.replace(/^(.*)\..*$/,"$1"),10);t[1]=parseInt(n.replace(/^.*\.(.*)\s.*$/,"$1"),10);t[2]=/r/.test(n)?parseInt(n.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof G.ActiveXObject!=Z){var o=null,s=false;try{o=new ActiveXObject(h+".7")}catch(k){try{o=new ActiveXObject(h+".6");t=[6,0,21];o.AllowScriptAccess="always"}catch(k){if(t[0]==6){s=true}}if(!s){try{o=new ActiveXObject(h)}catch(k){}}}if(!s&&o){try{n=o.GetVariable("$version");if(n){n=n.split(" ")[1].split(",");t=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]}}catch(k){}}}}var v=N.userAgent.toLowerCase(),j=N.platform.toLowerCase(),r=/webkit/.test(v)?parseFloat(v.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,i=false,q=j?/win/.test(j):/win/.test(v),m=j?/mac/.test(j):/mac/.test(v);/*@cc_on i=true;@if(@_win32)q=true;@elif(@_mac)m=true;@end@*/return{w3cdom:l,pv:t,webkit:r,ie:i,win:q,mac:m}}();var e=function(){if(!a.w3cdom){return }J(I);if(a.ie&&a.win){try{g.write("