/* ------------------------------------------
 * default.js 
/* ------------------------------------------ */

/* ------------------------------------------
 * IE6のhover時の背景画像ちらつき対処
/* ------------------------------------------ */
try {
	document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}


/* ------------------------------------------
 * IEのFLASHアクティブ化
/* ------------------------------------------ */
var bo_ns_id = 0;
function startIeFix(){
	if(isIE()){
		document.write('<noscript id="bo_ns_id_' + bo_ns_id + '">');
	}
}

function endIeFix(){
	if(isIE()){
		var theObject = document.getElementById("bo_ns_id_" + bo_ns_id++);
		var theNoScript = theObject.innerHTML;
		document.write(theNoScript);
	}
}

function isIE(){
	var strBrowser = navigator.userAgent.toLowerCase();
	if(strBrowser.indexOf("msie") > -1 && strBrowser.indexOf("mac") < 0){
		return true;
	}else{
		return false;
	}
}


/* ------------------------------------------
 * 上部スクロール
/* ------------------------------------------ */
function slowdownScroll() {
   if(navigator.appName == "Microsoft Internet Explorer" && document.compatMode == "CSS1Compat") {
      sctop = document.body.parentNode.scrollTop;
   }
   else if(window.pageYOffset){
      sctop = window.pageYOffset;
   } else {
      sctop = document.body.scrollTop;
   }

   if(sctop){
      scup = Math.ceil(sctop*.2);
      scrollBy(0,-scup);
      if (sctop-scup) setTimeout("slowdownScroll()",20);
   }
}
