/*------------------------------*/
/*--- ページトップスクロール ---*/
/*------------------------------*/
var scrj = 1;
function softScrollBack() {
   if(navigator.appName == "Microsoft Internet Explorer" && document.compatMode == "CSS1Compat") {
      var scdist = document.body.parentNode.scrollTop;
   } else {
      var scdist = document.body.scrollTop;
   }
   if(scrj<50 && scdist) {
      scdist = (scdist>2) ? Math.ceil(scdist*.2) : 1;
      scrj++;
      scrollBy(0,-scdist);
      setTimeout("softScrollBack()",20);
   } else {
      scrollTo(0,0);
      scrj = 1;
   }
}





/*--------------------------*/
/*--- フォームキーダウン ---*/
/*--------------------------*/
function fncforenter() 
{
	if (event.keyCode == 13)
	{
		event.cancelBubble = true;
		event.returnValue = false;
	}
}


/*--------------------------*/
/*--- ウィンドウオープン ---*/
/*--------------------------*/
function newWin3(url,target,wW,wH,flgSCBAR) {
	var win_attr = 'left=20,top=20,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,scrollbars=' + flgSCBAR + ',width=' + wW + ',height=' + wH;
	newWindow=open(url, target,win_attr);
	newWindow.focus();
}


/*--------------------------*/
/*--- カーソル変更 ---*/
/*--------------------------*/
function fnc_cm_Changecursor01(in01){
		document.body.style.cursor = in01;
}


/*--------------------------*/
/*--- 文字拡大対応変更(CSS) ---*/
/*--------------------------*/
function changesytle(in01,in02) {
	/*--- クッキー書き込み ---*/
	if (in01 != "")
	{
		theName  = in02;
		theValue = in01;
		theDay   = 1;
		setDay = new Date();
		setDay.setTime(setDay.getTime()+(theDay*1000*60*60*24));
		expDay = setDay.toGMTString();
		document.cookie = theName + "="+escape(theValue)+"; path=/; expires="+expDay;
	}

	/*--- クッキー読み込み ---*/
	theData   = "";
	theName   = in02 + "=";
	theCookie = document.cookie+";";
	start = theCookie.indexOf(theName);
	if (start != -1)
	{
		end = theCookie.indexOf(";",start);
		theData = unescape(theCookie.substring(start+theName.length,end));
	}
	
	/*--- ＣＳＳ読み込み ---*/
	if ( theData == "big"){
		document.getElementById('mystyle').href = "/css/bfont.css";
	}else if ( theData == "small"){
		document.getElementById('mystyle').href = "/css/sfont.css";
	}else{
		document.getElementById('mystyle').href = "/css/mfont.css";
	}
}
