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];}}
}

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_DisplayLayers() { //v6.0
  var i,p,v,obj,args=MM_DisplayLayers.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=='s')?'block':(v=='h')?'none':v; }
    obj.display=v; }
}

function MM_showHideLayers() { //v6.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; }
}


// カスタム
function MM_topagetop() {
	window.scrollTo(0,0);
}

function newOpen(){
  window.open("new.html","new","toolbar=0,location=0,directories=no,status=0,menubar=0,scrollbars=0,resizable=0,width=370,height=360");
}


//共通コンポーネント表示用

var url  = document.URL.toLowerCase();
var urls = url.split("/");
var dir,sslflg,files,sfile,sfiles;
var mokujiflg = false;
var itemflg = false;

if(url.indexOf("https://")>=0){
	sslflg = true;
} else {
	sslflg = false;
}
if(urls.length==6){
	dir   = urls[4];
	sfile = urls[5];
	//sfiles = sfile.split("index2_");
	//if(sfiles.length==2){
	//  mokujiflg = true;
	//}
	if(sfile.indexOf("index2_")>=0){
	  mokujiflg = true;
	}
	//files = sfile.split("index3_");
	//if(files.length==2){
	//  itemflg = true;
	//}
	if(sfile.indexOf("index3_")>=0){
	  itemflg = true;
	}
	//alert("itemflg="+itemflg+"\nfiles.length="+files.length);
} else {
	dir   = "";
	sfile = "";
}
//alert("dir="+dir+"\nsslflg="+sslflg+"\nsfile="+sfile);


//(1)Gnavi
function DispGnavi() {
var html = '			<table border="0" cellpadding="0" cellspacing="0" width="868">';
   html += '				<tr>';
   html += '					<td width="192" background="/images/gnav_blank.gif"><a href="/about/index.html" target="_top"><img src="/images/gnav_about.gif" width="192" height="33" alt="次世代教育推進機構について" border="0"></a></td>';
   html += '					<td width="6" background="/images/gnav_blank.gif"><img src="/images/gnav_part.gif" alt="" width="6" height="33" border="0"></td>';
   html += '					<td width="138" background="/images/gnav_blank.gif"><a href="/spice/index.html" target="_top"><img src="/images/gnav_spice.gif" alt="学校授業のスパイス" width="138" height="33" border="0"></a></td>';
   html += '					<td width="6" background="/images/gnav_blank.gif"><img src="/images/gnav_part.gif" alt="" width="6" height="33" border="0"></td>';

// html += '					<td width="124" background="/images/gnav_blank.gif"><a href="/item/index.html" target="_top"><img src="/images/gnav_item.gif" alt="i*tem" width="74" height="33" border="0"></a></td>';
// html += '					<td width="6" background="/images/gnav_blank.gif"><img src="/images/gnav_part.gif" alt="" width="6" height="33" border="0"></td>';
   html += '					<td width="106" background="/images/gnav_blank.gif"><a href="/item/arithmetic/index.html" target="_top"><img src="/images/gnav_item_arith.gif" alt="i*tem算数" width="106" height="33" border="0"></a></td>';
   html += '					<td width="6" background="/images/gnav_blank.gif"><img src="/images/gnav_part.gif" alt="" width="6" height="33" border="0"></td>';
   html += '					<td width="106" background="/images/gnav_blank.gif"><a href="/item/language/index.html" target="_top"><img src="/images/gnav_item_lang.gif" alt="i*tem国語" width="106" height="33" border="0"></a></td>';
   html += '					<td width="6" background="/images/gnav_blank.gif"><img src="/images/gnav_part.gif" alt="" width="6" height="33" border="0"></td>';

   html += '					<td width="86" background="/images/gnav_blank.gif"><a href="/s-pri/index.html" target="_top"><img src="/images/gnav_spri.gif" alt="Sプリ" width="86" height="33" border="0"></a></td>';
   html += '					<td width="6" background="/images/gnav_blank.gif"><img src="/images/gnav_part.gif" alt="" width="6" height="33" border="0"></td>';

   html += '					<td width="106" background="/images/gnav_blank.gif"><a href="/research/index.html" target="_top"><img src="/images/gnav_research.gif" alt="研究会のご案内" width="106" height="33" border="0"></a></td>';
   html += '					<td width="6" background="/images/gnav_blank.gif"><img src="/images/gnav_part.gif" alt="" width="6" height="33" border="0"></td>';
   html += '					<td width="98" background="/images/gnav_blank.gif"><a href="https://www.next-edu.or.jp/inquiry/index.asp" target="_top"><img src="/images/gnav_inquiry.gif" alt="お問い合わせ" width="98" height="33" border="0"></a></td>';
   html += '				</tr>';
   html += '		  </table>';
document.write(html);
}

function DispGnaviSSL() {
var html = '			<table border="0" cellpadding="0" cellspacing="0" width="868">';
   html += '				<tr>';
   html += '					<td width="192" background="/images/gnav_blank.gif"><a href="http://www.next-edu.or.jp/about/index.html" target="_top"><img src="/images/gnav_about.gif" width="192" height="33" alt="次世代教育推進機構について" border="0"></a></td>';
   html += '					<td width="6" background="/images/gnav_blank.gif"><img src="/images/gnav_part.gif" alt="" width="6" height="33" border="0"></td>';
   html += '					<td width="138" background="/images/gnav_blank.gif"><a href="http://www.next-edu.or.jp/spice/index.html" target="_top"><img src="/images/gnav_spice.gif" alt="学校授業のスパイス" width="138" height="33" border="0"></a></td>';
   html += '					<td width="6" background="/images/gnav_blank.gif"><img src="/images/gnav_part.gif" alt="" width="6" height="33" border="0"></td>';

// html += '					<td width="124" background="/images/gnav_blank.gif"><a href="http://www.next-edu.or.jp/item/index.html" target="_top"><img src="/images/gnav_item.gif" alt="i*tem" width="74" height="33" border="0"></a></td>';
// html += '					<td width="6" background="/images/gnav_blank.gif"><img src="/images/gnav_part.gif" alt="" width="6" height="33" border="0"></td>';
   html += '					<td width="106" background="/images/gnav_blank.gif"><a href="http://www.next-edu.or.jp/item/arithmetic/index.html" target="_top"><img src="/images/gnav_item_arith.gif" alt="i*tem算数" width="106" height="33" border="0"></a></td>';
   html += '					<td width="6" background="/images/gnav_blank.gif"><img src="/images/gnav_part.gif" alt="" width="6" height="33" border="0"></td>';
   html += '					<td width="106" background="/images/gnav_blank.gif"><a href="http://www.next-edu.or.jp/item/language/index.html" target="_top"><img src="/images/gnav_item_lang.gif" alt="i*tem国語" width="106" height="33" border="0"></a></td>';
   html += '					<td width="6" background="/images/gnav_blank.gif"><img src="/images/gnav_part.gif" alt="" width="6" height="33" border="0"></td>';

   html += '					<td width="86" background="/images/gnav_blank.gif"><a href="http://www.next-edu.or.jp/s-pri/index.html" target="_top"><img src="/images/gnav_spri.gif" alt="Sプリ" width="86" height="33" border="0"></a></td>';
   html += '					<td width="6" background="/images/gnav_blank.gif"><img src="/images/gnav_part.gif" alt="" width="6" height="33" border="0"></td>';

   html += '					<td width="106" background="/images/gnav_blank.gif"><a href="http://www.next-edu.or.jp/research/index.html" target="_top"><img src="/images/gnav_research.gif" alt="研究会のご案内" width="106" height="33" border="0"></a></td>';
   html += '					<td width="6" background="/images/gnav_blank.gif"><img src="/images/gnav_part.gif" alt="" width="6" height="33" border="0"></td>';
   html += '					<td width="98" background="/images/gnav_blank.gif"><a href="https://www.next-edu.or.jp/inquiry/index.asp" target="_top"><img src="/images/gnav_inquiry.gif" alt="お問い合わせ" width="98" height="33" border="0"></a></td>';
   html += '				</tr>';
   html += '		  </table>';
document.write(html);
}


//(2)itemMenu
function DispitemMenu(flg) {

  var n = '<img src="/image/icon/new_r.gif" alt="" width="18" height="8" hspace="2" vspace="3">';

//var html = '				    <a href="/item/index.html" target="_top"><img src="/item/images/bt_itemtop.gif" alt="小学生の算数・国語の副教材「i*tem（アイテム）」" width="165" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
//var html = '				    <a href="/item/arithmetic/index.html" target="_top"><img src="/item/images/bt_arithmetic_new.gif" alt="小学生の算数副教材 新版「i*tem（アイテム）」" width="165" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
var html = ''
 if(flg=='a'){
   html += '				    '+n+'<a href="/item/arithmetic/index.html" target="_top"><img src="/item/images/bt_arithmetic_new.gif" alt="小学生の算数副教材 新版「i*tem（アイテム）」" width="165" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="4"><br>';
//   html += '				    <a href="/item/arithmetic_new/index.html" target="_top"><img src="/item/images/bt_arithmetic_new.gif" alt="新版 i*tem 算数" width="165" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
//   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="8"><br>';
//   html += '				    <a href="/item/arithmetic/index.html" target="_top"><img src="/item/images/bt_arithmetic_new.gif" alt="新版 i*tem 算数" width="165" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
//   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="4"><br>';
   html += '				    '+n+'<a href="/item/index.html" target="_top"><img src="/item/images/bt_fromconcept.gif" alt="コンセプト" width="140" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="4"><br>';
   html += '				    '+n+'<a href="/item/arithmetic/index2_01.html" target="_top"><img src="/item/images/bt_fromindex.gif" alt="もくじから" width="140" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="4"><br>';
  if(mokujiflg==true){
   html += '				    <a href="/item/arithmetic/index2_01.html" target="_top"><img src="/item/arithmetic/images/bt_sub_12nen.gif" alt="1・2年" width="130" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="3"><br>';
   html += '				    <a href="/item/arithmetic/index2_02.html" target="_top"><img src="/item/arithmetic/images/bt_sub_34nen.gif" alt="3・4年" width="130" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="3"><br>';
   html += '				    <a href="/item/arithmetic/index2_03.html" target="_top"><img src="/item/arithmetic/images/bt_sub_56nen.gif" alt="5・6年" width="130" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="6"><br>';
  }
   html += '				    '+n+'<a href="/item/arithmetic/index3_01.html" target="_top"><img src="/item/images/bt_frompoint.gif" alt="構成・特色から" width="140" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="4"><br>';
  if(itemflg==true){
   html += '				    <a href="/item/arithmetic/index3_03.html" target="_top"><img src="/item/arithmetic/images/bt_sub_foursteps.gif" alt="4つのステップ" width="130" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="3"><br>';
   html += '				    <a href="/item/arithmetic/index3_04.html" target="_top"><img src="/item/arithmetic/images/bt_sub_jugyou.gif" alt="授業でわかる！" width="130" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="3"><br>';
   html += '				    <a href="/item/arithmetic/index3_05.html" target="_top"><img src="/item/arithmetic/images/bt_sub_specialitem.gif" alt="スペシャルアイテム" width="130" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="3"><br>';
   html += '				    <a href="/item/arithmetic/index3_06.html" target="_top"><img src="/item/arithmetic/images/bt_sub_twotests.gif" alt="2つのテスト" width="130" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="3"><br>';
   html += '				    <a href="/item/arithmetic/index3_07.html" target="_top"><img src="/item/arithmetic/images/bt_sub_katsuyou.gif" alt="活用問題" width="130" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="6"><br>';
  }
   html += '				    '+n+'<a href="/item/arithmetic/index4_01.html" target="_top"><img src="/item/images/bt_fromwriter.gif" alt="執筆者から" width="140" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="8"><br>';
   html += '				    <a href="/item/arithmetic/index6.html" target="_top"><img src="/item/images/bt_keisaishi.gif" alt="掲載誌から" width="155" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="8"><br>';
   html += '				    <a href="/item/arithmetic/faq.html" target="_top"><img src="/item/images/bt_faq.gif" alt="よくあるご質問" width="155" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="8"><br>';
   html += '				    <a href="/item/arithmetic/index7.html" target="_top"><img src="/item/images/bt_changeinfo.gif" alt="移行措置対応のご案内" width="155" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
//   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="12"><br>';
//   html += '				    <a href="/item/language/index.html" target="_top"><img src="/item/images/bt_language.gif" alt="i*tem 国語" width="165" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
 }
 if(flg=='l'){
 //html += '				    <img src="/images/spacer.gif" alt="" width="100" height="12"><br>';
   html += '				    <a href="/item/language/index.html" target="_top"><img src="/item/images/bt_language.gif" alt="i*tem 国語" width="165" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="4"><br>';
   html += '				    <a href="/item/language/mitsumura/index.html" target="_top"><img src="/item/images/bt_mitsumura.gif" alt="光村図書対応版" width="140" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="4"><br>';
   html += '				    <a href="/item/language/tokyo/index.html" target="_top"><img src="/item/images/bt_tokyo.gif" alt="東京書籍対応版" width="140" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="4"><br>';
   html += '				    <a href="/item/language/kyoiku/index.html" target="_top"><img src="/item/images/bt_kyoiku.gif" alt="教育出版対応版" width="140" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="8"><br>';
   html += '				    <a href="/item/language/index2.html" target="_top"><img src="/item/images/bt_jidounote.gif" alt="児童ノートから" width="155" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="8"><br>';
   html += '				    <a href="/item/language/faq.html" target="_top"><img src="/item/images/bt_faq.gif" alt="よくあるご質問" width="155" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
 }
 if(flg=='v'){
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="8"><br>';
   html += '				    <a href="/item/language/index.html" target="_top"><img src="/item/images/bt_language.gif" alt="i*tem 国語" width="165" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
 }
 if(flg!='s'){
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="12"><br>';
   html += '				    <a href="/item/voice/index.html" target="_top"><img src="/item/images/bt_cat_voice.gif" alt="活用校からの声" width="165" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
 }
 if(flg=='v'){
   html += '				    <img src="/images/spacer.gif" width="100" height="8"><br>';
   html += '				    <a href="/item/voice/backnumber/index.html" target="_top"><img src="/item/images/bt_backnumber.gif" alt="過去のレポート" width="155" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
 }

 if(flg=='s'){
   html += '				    <a href="/s-pri/index.html" target="_top"><img src="/s-pri/images/bt_spri.gif" alt="Sプリ" width="165" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="4"><br>';
 //html += '				    '+n+'<a href="/s-pri/index.html" target="_top"><img src="/s-pri/images/bt_fromconcept.gif" alt="コンセプト" width="140" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <a href="/s-pri/index.html" target="_top"><img src="/s-pri/images/bt_spri_concept.gif" alt="コンセプト" width="140" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="4"><br>';
   html += '				    <a href="/s-pri/tokushoku.html" target="_top"><img src="/s-pri/images/bt_spri_tokushoku.gif" alt="特色" width="140" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="4"><br>';
   html += '				    <a href="/s-pri/system.html" target="_top"><img src="/s-pri/images/bt_spri_system.gif" alt="学習システムとして" width="140" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
   html += '				    <img src="/images/spacer.gif" alt="" width="100" height="4"><br>';
   html += '				    <a href="/s-pri/annai.html" target="_top"><img src="/s-pri/images/bt_spri_annai.gif" alt="ご購入案内" width="140" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
 //html += '				    <img src="/images/spacer.gif" alt="" width="100" height="8"><br>';
 //html += '				    <a href="/item/language/faq.html" target="_top"><img src="/s-pri/images/bt_faq.gif" alt="よくあるご質問" width="155" height="26" border="0"></a><img src="/images/spacer.gif" alt="" width="8" height="5" border="0"><br>';
 }

document.write(html);
}


//(3)フッター
function DispFooter() {
var html = '			<table width="868" border="0" cellspacing="0" cellpadding="0">';
   html += '				<tr>';
   html += '					<td height="21" align="right" style="padding-right:20px;color:#000;font-size:11px;font-weight:normal;font-family:\'arial\';background:url(/images/belt_copyright_bg.gif);">Copyright (c) 2011 JisedaiKyoikuSuishinKikou. All Right Reserved.</td>';
   html += '				</tr>';
   html += '			</table>';
document.write(html);
}

function DispFooterShort() {
var html = '    <table width="600" border="0" cellspacing="0" cellpadding="0">';
   html += '    	<tr>';
   html += '			<td align="right"><br>';
   html += '			<img src="/images/dbline.gif" alt="" width="600" height="5" vspace="5" border="0"><br>';
   html += '			Copyright(C) 2011 JisedaiKyoiuSuishinKikou. All Rights Reserved.<br>';
   html += '			<img src="/images/dbline.gif" alt="" width="600" height="5" vspace="5" border="0"></td>';
   html += '   		</tr>';
   html += '	</table>';
document.write(html);
}


