// <![CDATA[
/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
**/
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

/**************************************************
 *
 * helpful sites are below:
 * http://d.hatena.ne.jp/KAZUMiX/20081229/meltdown2
 * http://d.hatena.ne.jp/nitoyon/20080929/warioland_shake
 *
**************************************************/
function getImgElements(){var rtn=[];var pos,elm,img;var elms=document.getElementsByTagName('img');for(var i=0,l=elms.length;i<l;i++){elm=elms[i];pos=getAbsolutePosition(elm);img={x:pos.x,y:pos.y,width:elm.width,height:elm.height,url:elm.src};sendDat[i]=img;rtn[i]=elm};return rtn};function getExpImgElements(){var rtn=[];var elm,pos;var elms=document.body.getElementsByTagName('*');for(var i=0,l=elms.length;i<l;i++){elm=elms[i];if(elm.tagName=='IMG'||elm==wrapDiv||elm==introDiv){continue};if(elm.tagName.match(/^(tbody|tr|script|noscript|label)$/i)||computedStyle(elm,'display').match(/^(none|inline)$/i)||computedStyle(elm,'visibility').match(/^hidden$/i)){continue};if(computedStyle(elm,'position').match(/absolute/i)){var top=computedStyle(elm,'top');var right=computedStyle(elm,'right');var bottom=computedStyle(elm,'bottom');var left=computedStyle(elm,'left');if(top=='auto'&&right=='auto'&&bottom=='auto'&&left=='auto'){continue};if(top.match(/%$/)||right.match(/%$/)||bottom.match(/%$/)||left.match(/%$/)){continue}};pos=getAbsolutePosition(elm);elm._x=pos.x;elm._y=pos.y;elm._fin=false;rtn.push(elm)};return rtn};function getAbsolutePosition(elm){var xx=0,yy=0;while(elm){xx+=elm.offsetLeft||0;yy+=elm.offsetTop||0;elm=elm.offsetParent};return{x:xx,y:yy}};function getRelativePosition(elm){var xx=0,yy=0;while(elm){xx+=elm.aX||0;yy+=elm.aY||0;elm=elm.offsetParent};return{x:xx,y:yy}};function initAniElement(elm){var position=computedStyle(elm,'position');if(!position.match(/(relative|absolute)/i)){elm.style.position='relative';elm.aX=0;elm.aY=0;elm.propX='left';elm.propY='top'}else{var left=computedStyle(elm,'left');var right=computedStyle(elm,'right');if(left!='auto'||(left=='auto'&&right=='auto')){elm.aX=parseInt(left,10)||0;elm.propX='left'}else{elm.aX=parseInt(right,10)||0;elm.propX='right'};var top=computedStyle(elm,'top');var bottom=computedStyle(elm,'bottom');if(top!='auto'||(top=='auto'&&bottom=='auto')){elm.aY=parseInt(top,10)||0;elm.propY='top'}else{elm.aY=parseInt(bottom,10)||0;elm.propY='bottom'}};elm.style[elm.propX]=elm.style[elm.propY]=0;elm._aX=elm.aX;elm._aY=elm.aY;elm.randX=5*Math.random()-2.5;elm.randY=5*Math.random()-2.5;elm.randDis=1+0.5*Math.random();elm.randRot=0.05+0.05*Math.random();elm._a=(Math.random()*0.1)+0.05;elm._t=0;elm.brr=Math.floor(Math.random()*(BRR_MAX-30))+30;if(elm.style.fontSize){elm.style.fontSize.match(/^(\d+)(.+)$/i);elm.fontSize=RegExp.$1;elm.fontUint=RegExp.$2}else{elm.fontSize=100;elm.fontUint='%'};if(elm.innerText==''){elm.brr=0;elm._a=0.8};elm._toX=elm._aX+bhPosX-elm._x-(elm.offsetWidth/2);elm._toY=elm._aY+bhPosY-elm._y;elm.style.width=elm.offsetWidth+"px";elm.style.height=elm.offsetHeight+"px";elm.dist=elm._dist=getDistance(elm._toX,elm._toY,elm.aX,elm.aY);elm.cntRad=Math.atan2(elm.aY-elm._toY,elm.aX-elm._toX)};function getDistance(x1,y1,x2,y2){return Math.sqrt(Math.pow(x2-x1,2)+Math.pow(y2-y1,2))};function addOnloadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func}else{window.onload=function(){oldonload();func()}}};function getViewportArea(){return{x:document.body.scrollLeft||document.documentElement.scrollLeft,y:document.body.scrollTop||document.documentElement.scrollTop,width:window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth,height:window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight,allWidth:Math.max(document.body.scrollWidth,Math.max(document.body.clientWidth,document.documentElement.clientWidth)),allHeight:Math.max(Math.max(document.body.scrollHeight,(window.scrollMaxY||0)+(window.innerHeight||0)),(document.documentElement.clientHeight||document.body.clientHeight))}};function createOverlaySwf(){introDiv=document.createElement("div");introDiv.style.position="absolute";introDiv.style.zIndex=2;introDiv.style.width=introDiv.style.height="100%";introDiv.style.left=introDiv.style.top="0px";introDiv.style.overflow='hidden';document.body.appendChild(introDiv);var so=new SWFObject(SWF_URL_INTRO+"?"+new Date().getTime(),SWF_ID_INTRO,"100%","100%","9.0.45","#000000");so.addParam("wmode","transparent");so.addParam("allowScriptAccess","always");so.write(introDiv);introSwf=document.getElementById(SWF_ID_INTRO);checkLoadedSwf()};function checkLoadedSwf(){var doExe=true;try{if(introSwf.isReady()==true){clearTimeout(swfTimer);doExe=false;onLoadedSwf()}}catch(e){};if(doExe){swfTimer=setTimeout(function(){checkLoadedSwf()},2000)}};function onLoadedSwf(){bpSwf.remove()};function startIntro(){viewPortArea=getViewportArea();addWrapper(viewPortArea.allWidth,viewPortArea.allHeight);targetElms=getExpImgElements();imgElms=getImgElements();targetElms=shuffleArray(targetElms);adjustViewportArea();introSwf.init(sendDat,viewPortArea,{x:bhPosX,y:bhPosY});window.onscroll=window.onresize=function(){adjustViewportArea();introSwf.update(sendDat,viewPortArea,{x:bhPosX,y:bhPosY})};introSwf.showBlackHole();doBH()};function adjustViewportArea(){viewPortArea=getViewportArea();introDiv.style.left=viewPortArea.x+"px";introDiv.style.top=viewPortArea.y+"px"};function hideImgElements(){for(var i=0,l=imgElms.length;i<l;i++){imgElms[i].style.visibility='hidden'};loadedAllImgs=true};function doBH(id){if(id==undefined){id=targetElms.length-1};if(targetElms.length>0){var elm=targetElms[id];var isFin=isFinishedChildren(elm,0);if(isFin==0){targetElms.splice(id,1);flyElms.push(elm);initAniElement(elm);elm.style.zIndex=8884+id}};elementHandler();if(id>0){id--}else{id=undefined}if((flyElms.length==0&&targetElms.length==0&&swfComplete)){clearTimeout(bhTimer);showIntro()}else{bhTimer=setTimeout(function(){doBH(id)},interval)};time+=1};function isFinishedChildren(elm,num){for(var i=0,l=elm.childNodes.length;i<l;i++){var childElm=elm.childNodes[i];if(childElm._fin==undefined){isFinishedChildren(childElm,num)}else if(childElm._fin==false){num++}};return num};function showIntro(){introSwf.style.zIndex=9999;introSwf.showGalaxy()};function afterIntro(){wrapDiv.style.display='none'};function elementHandler(){var elm;for(var i=0,l=flyElms.length;i<l;i++){elm=flyElms[i];if(elm.brr==0||swfComplete){if(fly(elm)){elm.style.visibility='hidden';elm._fin=true;flyElms.splice(i,1);finElms.push(elm);i--;l--;continue}}else{brr(elm)}}};function fly(elm){elm._t+=1;elm.cntRad-=elm.randRot*elm._t*0.1;if(swfComplete){elm._a=0.8};elm.dist+=(0-elm.dist)*elm._a;elm.aX=(elm.dist*Math.cos(elm.cntRad))+elm._toX;elm.aY=(elm.dist*Math.sin(elm.cntRad))+elm._toY;elm.style[elm.propX]=(elm.aX)+"px";elm.style[elm.propY]=(elm.aY)+"px";var scale=elm.dist/elm._dist;elm.style.fontSize=(elm.fontSize*scale)+elm.fontUint;if(elm.dist<5){return true};return false};function brr(elm){elm.aX=elm._aX+Math.random()*((BRR_MAX-elm.brr)/10)-3;elm.aY=elm._aY+Math.random()*((BRR_MAX-elm.brr)/10)-3;elm.style[elm.propX]=elm.aX+"px";elm.style[elm.propY]=elm.aY+"px";if(elm.brr>0){elm.brr--}};function shuffleArray(ary){var n=ary.length;while(n--){var i=Math.floor(Math.random()*(n+1));var t=ary[n];ary[n]=ary[i];ary[i]=t};return ary};function completeAllImages(){swfComplete=true};function removeUnit(val){val.match(/^(\d+)/);return parseInt(RegExp.$1)};function addWrapper(w,h){var mt=removeUnit(computedStyle(document.body,'marginTop')||0);var mr=removeUnit(computedStyle(document.body,'marginRight')||0);var mb=removeUnit(computedStyle(document.body,'marginBottom')||0);var ml=removeUnit(computedStyle(document.body,'marginLeft')||0);var pt=removeUnit(computedStyle(document.body,'paddingTop')||0);var pr=removeUnit(computedStyle(document.body,'paddingRight')||0);var pb=removeUnit(computedStyle(document.body,'paddingBottom')||0);var pl=removeUnit(computedStyle(document.body,'paddingLeft')||0);w=w-(mr+ml+pl+pr);h=h-(mt+mb+pt+pb);var m=mt+'px '+mr+'px '+mb+'px '+ml+'px';var p=pt+'px '+pr+'px '+pb+'px '+pl+'px';document.body.style.margin=0;document.body.style.padding=0;var pos=getAbsolutePosition(bpDiv);bhPosX=pos.x+(BP_WIDTH/2);bhPosY=pos.y+(BP_HEIGHT/2);bpDiv.style.width=BP_WIDTH+"px";bpDiv.style.height=BP_HEIGHT+"px";bpDiv.innerHTML='';wrapDiv=document.createElement("div");wrapDiv.style.position="absolute";wrapDiv.style.width=w+"px";wrapDiv.style.height=h+"px";wrapDiv.style.left=wrapDiv.style.top=0;wrapDiv.style.margin=m;wrapDiv.style.padding=p;wrapDiv.style.overflow='hidden';wrapDiv.style.textAlign=computedStyle(document.body,'textAlign');document.body.appendChild(wrapDiv);for(var i=0,l=document.body.childNodes.length-2;i<l;i++){wrapDiv.appendChild(document.body.childNodes[0])}};function startBH(){createOverlaySwf()};var interval=1000/30;var computedStyle;var IE=false;var WRAP_DIV="mugen_wrapper";var SWF_DIV_BP="mugen_bp";var SWF_ID_BP="mugenbpexternal";var SWF_URL_BP="mugen_bp.swf";var SWF_ID_INTRO="mugenexternal";var SWF_URL_INTRO="mugen_intro.swf";var introDiv,bpDiv,viewPortDiv,wrapDiv;var introSwf,bpSwf;var viewPortArea;var _t=0;var targetElms=[];var sendDat=[];var imgElms=[];var flyElms=[];var finElms=[];var BP_WIDTH=180;var BP_HEIGHT=280;var loadedAllImgs=false;var swfComplete=false;var swfTimer,bhTimer;var cnt=0;var BRR_MAX=100;var bhPosX,bhPosY;var time=0;if(window.attachEvent&&!window.opera){IE=true};if(window.getComputedStyle){computedStyle=function(elm,prop){return window.getComputedStyle(elm,null)[prop]}}else if(document.body.currentStyle){computedStyle=function(elm,prop){return elm.currentStyle[prop]}};var currentScript=(function(e){if(e.nodeName.toLowerCase()=='script')return e;return arguments.callee(e.lastChild)})(document);var path=currentScript.src;path=path.substring(0,path.lastIndexOf("/"));SWF_URL_INTRO=path+"/"+SWF_URL_INTRO;document.open();document.write('<div id="'+SWF_DIV_BP+'"><a href="http://get.adobe.com/jp/flashplayer/" target="_blank"><img src="'+path+'/'+'noflash.jpg" width="'+BP_WIDTH+'" height="'+BP_HEIGHT+'" alt="最新のAdobe Flash Player&reg;(無料)をインストールして下さい" style="border:0"></a></div>');document.close();var so=new SWFObject(path+"/"+SWF_URL_BP+"?"+new Date().getTime(),SWF_ID_BP,BP_WIDTH,BP_HEIGHT,"9.0.45","#ffffff");so.addParam("wmode","transparent");so.addParam("allowScriptAccess","always");so.write(SWF_DIV_BP);bpDiv=document.getElementById(SWF_DIV_BP);bpSwf=document.getElementById(SWF_ID_BP);
// ]]>
