﻿if(!window.JSFX){var JSFX=new Object()}var ie=(navigator.appName.indexOf('Microsoft')!=-1)?true:false;var ie4=(ie&&document.all&&!document.getElementById)?true:false;var ie5=(ie&&document.getElementById&&navigator.userAgent.indexOf('MSIE 6.0')==-1)?true:false;var ie6=(ie&&document.getElementById&&!ie5)?true:false;var ie4Min=(ie4||ie5||ie6)?true:false;var ie5Min=(ie5||ie6)?true:false;var ie6Min=ie6;var ns=(navigator.appName.indexOf('Netscape')!=-1)?true:false;var ns4=(ns&&document.layers)?true:false;var ns6=(ns&&document.getElementById)?true:false;var ns4Min=(ns4||ns6)?true:false;var ns6Min=ns6;var has_waited=false;function getWinHeight(){if(ie4Min){return document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight}else if(ns4Min){return window.innerHeight}return 0}function getWinWidth(){if(ie4Min){return document.body.clientWidth}else if(ns4Min){return window.innerWidth}return 0}if(!JSFX.createLayer){var seconds;var maxAnimWidth=0;var maxAnimHeight=0;JSFX.objNo=0;JSFX.getObjId=function(){return"JSFX_obj"+JSFX.objNo++};JSFX.createLayer=function(theHtml){var layerId=JSFX.getObjId();document.write(ns4?"<LAYER NAME='"+layerId+"'>"+theHtml+"</LAYER>":"<DIV id='"+layerId+"' style='POSITION:absolute; TOP: -200px; LEFT: -200px; Z-INDEX: 10;'>"+theHtml+"</DIV>");var el=document.getElementById?document.getElementById(layerId):document.all?document.all[layerId]:document.layers[layerId];if(ns4){el.style=el}return el};JSFX.fxLayer=function(theHtml){if(theHtml==null){return}this.el=JSFX.createLayer(theHtml)};var proto=JSFX.fxLayer.prototype;proto.moveTo=function(x,y){this.el.style.left=x+"px";this.el.style.top=y+"px"};proto.setBgColor=function(color){this.el.style.backgroundColor=color};proto.clip=function(x1,y1,x2,y2){this.el.style.clip="rect("+y1+" "+x2+" "+y2+" "+x1+")"};if(ns4){proto.clip=function(x1,y1,x2,y2){this.el.style.clip.top=y1;this.el.style.clip.left=x1;this.el.style.clip.bottom=y2;this.el.style.clip.right=x2};proto.setBgColor=function(color){this.el.bgColor=color}}if(window.opera){proto.setBgColor=function(color){this.el.style.color=color==null?'transparent':color}}JSFX.fxLayer2=function(theHtml){this.superC=JSFX.fxLayer;this.superC(theHtml+"C")};JSFX.fxLayer2.prototype=new JSFX.fxLayer}JSFX.Animation=function(images){this.id=JSFX.getObjId();window[this.id]=this;this.imgId="i"+this.id;this.images=images;this.nbFrames=images.length;this.superC=JSFX.fxLayer;this.superC("<img src='"+images[0].src+"' name='"+this.imgId+"'>");this.img=document.layers?this.el.document.images[0]:document.images[this.imgId];this.step=0;this.timerId=-1;this.x=0;this.y=0;this.dx=0;this.dy=0;this.ay=0.2;this.state="OFF"};JSFX.Animation.prototype=new JSFX.fxLayer;JSFX.Animation.prototype.getMaxDy=function(){var ydiff=getWinHeight()-maxAnimHeight;var dy=1;var dist=0;var ay=this.ay;while(dist<ydiff){dist+=dy;dy+=ay}return-dy};JSFX.Animation.prototype.setFrame=function(){this.img.src=this.images[this.step].src};JSFX.Animation.prototype.animate=function(){if(this.state=="OFF"){this.step=0;this.x=-maxAnimWidth-10;this.y=-maxAnimHeight-10;this.moveTo(this.x,this.y);this.setFrame();if(Math.random()>=threshold){this.x=parseInt((getWinWidth()-maxAnimWidth)*Math.random());this.y=parseInt((getWinHeight()-maxAnimHeight)*Math.random());this.moveTo(this.x,this.y);this.state="EXPLODE"}}else if(this.state=="EXPLODE"){this.step++;if(this.step<this.nbFrames){this.setFrame()}else{this.state="OFF";if(variableSpeed==true){seconds=new Date().getSeconds();if(seconds<10){threshold=0.98}else if(seconds<45){threshold=0.6}else{threshold=0.3}}}}};JSFX.AnimationGroup=function(n,images,nbFrames){this.id=JSFX.getObjId();window[this.id]=this;this.timerId=-1;this.animations=new Array();this.imgArray=new Array();this.loadCount=0;this.loadImages(images,nbFrames);for(var i=0;i<n;i++){this.animations[this.animations.length]=new JSFX.Animation(this.imgArray)}};JSFX.AnimationGroup.prototype.loadImages=function(imageName,nbFrames){for(var i=0;i<nbFrames;i++){this.imgArray[i]=new Image();this.imgArray[i].obj=this;this.imgArray[i].onload=window[this.id].imageLoaded;this.imgArray[i].src="http://www.ecards-passion.net/ulybka-art/animations/"+imageName+"/"+i+".gif"}};JSFX.AnimationGroup.prototype.imageLoaded=function(){this.obj.loadCount++};JSFX.AnimationGroup.prototype.animate=function(){if(run_anim==true){for(var i=0;i<this.animations.length;i++){this.animations[i].animate()}}else{clearInterval(this.timerId);for(var i=0;i<JSFX.objNo;i++){var child=document.getElementById("JSFX_obj"+i);if(child!=null){var parent=child.parentNode;parent.removeChild(child)}}}};JSFX.AnimationGroup.prototype.start=function(){if(this.timerId==-1){this.state="OFF";window[this.id].animate();this.timerId=setInterval("window."+this.id+".animate()",delayBetweenFrames)}};JSFX.AnimationStart=function(){for(var i=0;i<nbGroups;i++){animationGroups[i].start()}};function waitTillLoaded(){var minAnimWidth=999;var minAnimHeight=999;for(var g=0;g<nbGroups;g++){for(var i=0;i<animationGroups[g].imgArray.length;i++){maxAnimWidth=Math.max(maxAnimWidth,animationGroups[g].imgArray[i].width);maxAnimHeight=Math.max(maxAnimHeight,animationGroups[g].imgArray[i].height);minAnimWidth=Math.min(maxAnimWidth,animationGroups[g].imgArray[i].width);minAnimHeight=Math.min(maxAnimHeight,animationGroups[g].imgArray[i].height)}}if((minAnimWidth==0)||(minAnimHeight==0)){if(has_waited==false){document.write("<div id='please_wait' style='position:absolute; z-index:3; top: 50%; left: 50%; margin-left: -195px; margin-top: -50px;'>");document.write("<table bgcolor=#FFFFFF><tr><td><img src=http://www.ecards-passion.net/ulybka-art/others/hourglass.jpg width=90 height=90></td>");document.write("<td><b>");document.write("Loading, please wait...<br>");document.write("Chargement en cours...<br>");document.write("Cargando, por favor espere...<br>");document.write("Идёт загрузка, подаждите пожалуйста...");document.write("</b></td></tr></table></div>");has_waited=true}setTimeout("waitTillLoaded()",250)}else{if(has_waited==true){var child=document.getElementById("please_wait");if(child!=null){var parent=child.parentNode;parent.removeChild(child)}}maxAnimWidth+=31;maxAnimHeight+=10;JSFX.AnimationStart()}};var animationGroups=new Array();for(var g=0;g<nbGroups;g++){animationGroups[g]=new JSFX.AnimationGroup(groups[g][0],groups[g][1],groups[g][2])}waitTillLoaded();
