function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3)
  	if ((obj=MM_findObj(args[i]))!=null) {
  		v=args[i+2];
  		if (obj.style) {
  			obj=obj.style;
  			v=(v=='show')?'visible':(v='hide')?'hidden':v;
  		}
    	obj.visibility=v;
    }
}



/* フローティングメニュー
 * wrapScroll
 * Copyright 2007 youmos <youmos.com@gmail.com>
 * http://youmos.com/project/wrapscroll
 * 
 * The wrapScroll is licensed under a 
 * Creative Commons Attribution-NonCommercial-NoDerivs License.
 *
 * http://creativecommons.org/licenses/by-nc-nd/3.0/
 *
 * It is provided "as is" and without warranty of any kind. If you wish to continue to use it,
 * free for personal or non-commercial use, $30 for commercial use,
 * or transform and build your script upon this work to distribute.
 * The permission is valid for all future versions of wrapScroll.
*/

/*--- wrapscroll.js ---*/
var wrapScroll=function(){
	this.initialize.apply(this,arguments);
	};wrapScroll.prototype={
		Version:'0.9.5',Interval:100,Duration:150,marginTop:0,marginBottom:0,_timer:0,_obj:null,initialize:function(e,p,r){
			this.attach(window,'load',this.bind(this.prepare,arguments));
			},prepare:function(e,p,r){
				if(o=document.getElementById(e)){
					this._obj={'e':o,'p':(p)?document.getElementById(p):o.parentNode,'r':(r)?document.getElementById(r):null
					};o.style.position='absolute';
					if((c=o.offsetTop)!=(v=((o.style.top=o.offsetTop+'px')!='')?o.offsetTop:0)){
						o.style.marginTop=0;o.style.top=c+(v-c)+'px';
						}this.callback();
					}
				},callback:function(){
					f=this.event.update(this,this._obj);setTimeout(this.bind(this.callback),(f)?10:this.Interval);
					},bind:function(method,arg){
						var _this=this;var _arg=(arg)?arg:[];return function(){
							method.apply(_this,_arg);
							}
						},attach:function(e,name,func,cap){
							if(e.addEventListener){
								e.addEventListener(name,func,cap);
								}else if(e.attachEvent){
									e.attachEvent('on'+name,func);
									}
								},setTween:function(f,d){
									if(f){this.tween=f;
									}if(d){
										this.Duration=d;
										}
									},tween:function(t,b,c,d){
										return c*(t/=d)*t+b;
										}
									};wrapScroll.prototype.event={
										update:function(t,o){
											var tpos=Math.max(this.scroll(),(o.r)?this.offset(o.r)+this.height(o.r):this.offset(o.p));
											var bpos=(this.offset(o.p)+this.height(o.p))-(this.height(o.e)+t.marginBottom);
											var s=this.offset(o.e);
											var e=Math.min(bpos,tpos+t.marginTop);
											if((t._prev!=e)||(t._timer>t.Duration)){
												t._timer=0;}if((t._prev=e)!=s){
													o.e.style.top=t.tween(t._timer++,s,e-s,t.Duration,o.e.style)+'px';return true;
													}return false;
												},scroll:function(){
													return document.body.scrollTop||document.documentElement.scrollTop;
													},height:function(o){
														return o.offsetHeight||document.body.scrollHeight||document.documentElement.scrollHeight;
														},offset:function(o){
															y=o.offsetTop;if(o.style.position=='absolute')return y;while(o=o.offsetParent){
																y+=o.offsetTop;}return y;
																}
															};