//default.js

//Copyright ????
// ??javascript ????
// ?????????(???????:fontsize.js)
// ?????????(?????????:interface.js,jquery.js)
// ???????????heightLine.js ??????
// ?????????(flash???????:flash_ini.js,flash_vb.js,flash_ver.js)
// print CSS?????
// Google analytics

// ???????????
// ?????????
// SSL??SSL????
// ??????
// CSS???????

//Copyright ????
function ShowNowYear() {
   var now = new Date();
   var year = now.getFullYear();
   document.write(year);
}

//?????????
document.write('<script language="JavaScript" type="text/javascript" src="/common/js/flash_ini.js"></script>');
document.write('<script language="VBScript" type="text/vbscript" src="/common/js/flash_vb.js"></script>');
document.write('<script language="JavaScript1.1" type="text/javascript" src="/common/js/flash_ver.js"></script>');
document.write('<script language="JavaScript" type="text/javascript" src="/common/js/fontsize.js"></script>');
document.write('<script language="JavaScript" type="text/javascript" src="/common/js/jquery.js"></script>');
document.write('<script language="JavaScript" type="text/javascript" src="/english/common/js/interface.js"></script>');

//print CSS?????
function insertPrintStyle(){
	if(location.search== "?print"){
		document.write('<link rel="stylesheet" ')
		document.write('type="text/css" ')
		document.write('href="/common/css/forprint.css"')
		document.write('>')

		var ua = navigator.userAgent;
		if(ua.indexOf("Safari")>-1 || ua.indexOf("Netscape")>-1){
			return false;
		}

		if(window.opener){
			var opnrUri = window.opener.window.location.href;
			var uris = opnrUri.split("#");
			if(uris[1]){
				window.location.href = window.location.pathname+window.location.search+"#"+uris[1];
			}
		}
	}
}
insertPrintStyle();

//Google analytics
document.write(
"<script src=\"http://www.google-analytics.com/urchin.js\" type=\"text/javascript\">"
+"</script>"
+"<script type=\"text/javascript\">"
+"_uacct = \"UA-yourID-1\";"
+"urchinTracker();"
+"</script>"
);
document.close();

//???????????
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_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

MM_preloadImages(
'/img/btn/link.gif',
'/img/btn/link_on.gif',
'/img/btn/print_01.gif',
'/img/btn/print_01_ovr.gif',
'/img/btn/print_02.gif',
'/img/btn/print_02_ovr.gif'
)

//SSL??SSL????
function actionTo( form, path ){
  actionTo( form, path, 0 );
}

function actionToSSL( form, path ){
  actionToSSL( form, path, 0 );
}

function actionTo( form, path, newWin ){
  var uri = 'http://' + window.location.host + path;
  form.action = uri;
  if( newWin ){
    form.target = '_blank';
  }
}

function actionToSSL( form, path, newWin ){
  var uri = 'https://' + window.location.host + path;
  form.action = uri;
  if( newWin ){
    form.target = '_blank';
  }
}

function moveTo( path ){
  moveTo( path, 0 );
}

function moveToSSL( path ){
  moveToSSL( path, 0 );
}

function moveTo( path, newWin ){
  var uri = 'http://' + window.location.host + path;
  if( newWin == 1 ){
    w = window.open(uri, '_blank');
  }
  else if( newWin ){
    w = window.open(uri, newWin);
  }
  else{
    window.location = uri;
  }
}

function moveToSSL( path, newWin ){
  var uri = 'https://' + window.location.host + path;
  if( newWin == 1 ){
    w = window.open(uri, '_blank');
  }
  else if( newWin ){
    w = window.open(uri, newWin);
  }
  else{
    window.location = uri;
  }
}

//??????
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//CSS???????
var Win=(navigator.userAgent.indexOf("Win")!=-1);
var Mac=(navigator.userAgent.indexOf("Mac")!=-1);
var Explorer=(navigator.appName.indexOf("Explorer")!=-1);
var Netscape=(navigator.appName.indexOf("Netscape")!=-1);
var opera=(navigator.userAgent.indexOf("Opera")!=-1);
var Version=navigator.appVersion.charAt(0);
if
(Mac)
{document.write('<LINK rel="stylesheet" href="/css/mac.css" type="text/css">');}