function TitleMove() {
	xoffs=200
	yoffs=25

	if (document.all) {
		if (document.all.E1.style.posLeft==0) {
			document.all.E1.style.posLeft = xoffs;
			document.all.E1.style.posTop  = yoffs;
			document.all.E2.style.posLeft = xoffs+20;
			document.all.E2.style.posTop  = yoffs;
			document.all.E3.style.posLeft = xoffs+370;
			document.all.E3.style.posTop  = yoffs;
		}
		if (document.all.E1.style.posLeft<xoffs+50) {
			document.all.E1.style.posLeft += 1;
			document.all.E1.style.posTop += 1;
		} else if (document.all.E2.style.posTop<yoffs+85){
			document.all.E2.style.posLeft += 0;
			document.all.E2.style.posTop += 1;
		} else if (document.all.E3.style.posTop<yoffs+25){
			document.all.E3.style.posLeft -= 1;
			document.all.E3.style.posTop += 1;
		}
	} else if (document.layers) {
		if (document.layers["N1"].left==0) {
			document.layers["N1"].left = xoffs;
			document.layers["N1"].top  = yoffs-10;
			document.layers["N2"].left = xoffs+20;
			document.layers["N2"].top  = yoffs-20;
			document.layers["N3"].left = xoffs+370;
			document.layers["N3"].top  = yoffs-10;
		}
		if (document.layers["N1"].left<xoffs+50) {
			document.layers["N1"].left += 1;
			document.layers["N1"].top += 1;
		} else if (document.layers["N2"].top<yoffs+85-15){
			document.layers["N2"].left += 0;
			document.layers["N2"].top += 1;
		} else if (document.layers["N3"].top<yoffs+25-15){
			document.layers["N3"].left -= 1;
			document.layers["N3"].top += 1;
		}
	}
	window.setTimeout("TitleMove()", 5);
}


function cngbg(sel){
    var si  = document.MKCSS.BGCOLOR.selectedIndex;
    var sc = document.MKCSS.BGCOLOR.options[si].value;
	document.bgColor = sc;
}



function cngbgimg(src,side)
{
	var	radio = document.BGIMG.SIDE;
	var	TXT;

	if (radio.length){
		for (i=0; i < radio.length; i++){
			if (radio[i].checked){
				TXT = radio[i].value;
			}
		}
	} else {
		if (radio.checked){
			TXT	= radio.value;
		}
	}


	if (TXT=="BODY") {
		document.BGIMG.BACK.value = src;
		window.opener.parent.main.document.body.background = src;
	} else if (TXT=="LEFT") {
		document.BGIMG.LMENU.value = src;
		window.opener.parent.left.document.body.background = src;
	} else if (TXT=="TOP") {
		document.BGIMG.TMENU.value = src;
		window.opener.parent.left.document.body.background = src;
	} else {
		var obj=window.opener.parent.main.document.all && window.opener.parent.main.document.all(TXT)
			|| window.opener.parent.main.document.getElementById && window.opener.parent.main.document.getElementById(TXT);

		if (obj) {
			obj.style.background = "url("+src+")";
			if (TXT=="MenuColor") {
				document.BGIMG.LMENU.value = src;
			}else if (TXT=="TopColor") {
				document.BGIMG.TMENU.value = src;
			}
		}
	}
}

function TagImg(id,src)
{
alert(id);
alert(src);
	if(window.opener.parent.main.document.getElementsByTagName) {
		var tag;
		var	i=0;

		tag=window.opener.parent.main.document.getElementsByTagName(id).item(i);
alert(tag);
		while( tag ) {
			i++;
			tag.style.background="url("+src+")";
			tag=window.opener.parent.main.document.getElementsByTagName(id).item(i);
		}
	}
}

function bgcol(itm,id)
{
	var si  = document.MKCSS[itm].selectedIndex;
	var sc = document.MKCSS[itm].options[si].value;
	var obj=window.opener.parent.main.document.all && window.opener.parent.main.document.all(id)
		|| window.opener.parent.main.document.getElementById && window.opener.parent.main.document.getElementById(id);

	if (obj)
		obj.style.backgroundColor = sc;
}

function txtcolor(itm,id)
{
	var obj=window.opener.parent.main.document.all && window.opener.parent.main.document.all(id)
		|| window.opener.parent.main.document.getElementById && window.opener.parent.main.document.getElementById(id);
    var si  = document.MKCSS[itm].selectedIndex;
    var sc = document.MKCSS[itm].options[si].value;

	if (obj)
		obj.style.color = sc;
}

function TagBgColor(itm,id)
{
    var si  = document.MKCSS[itm].selectedIndex;
    var sc = document.MKCSS[itm].options[si].value;

	if(window.opener.parent.main.document.getElementsByTagName) {
		var tag;
		var	i=0;

		tag=window.opener.parent.main.document.getElementsByTagName(id).item(i);
		while( tag ) {
			i++;
			tag.style.background=sc;
			tag=window.opener.parent.main.document.getElementsByTagName(id).item(i);
		}
	}
}

function TagFontColor(itm,id)
{
    var si  = document.MKCSS[itm].selectedIndex;
    var sc = document.MKCSS[itm].options[si].value;

	if(window.opener.parent.main.document.getElementsByTagName) {
		var tag;
		var	i=0;

		tag=window.opener.parent.main.document.getElementsByTagName(id).item(i);
		while( tag ) {
			i++;
			tag.style.color=sc;
			tag=window.opener.parent.main.document.getElementsByTagName(id).item(i);
		}
	}
}

function TagFontSize(itm,id)
{
    var si  = document.MKCSS[itm].selectedIndex;
    var sc = document.MKCSS[itm].options[si].value;

	if(window.opener.parent.main.document.getElementsByTagName) {
		var tag;
		var	i=0;

		tag=window.opener.parent.main.document.getElementsByTagName(id).item(i);
		while( tag ) {
			i++;
			tag.style.fontSize=sc;
			tag=window.opener.parent.main.document.getElementsByTagName(id).item(i);
		}
	}
}



function txtsize(itm,Obj){
    var si  = document.MKCSS[itm].selectedIndex;
    var sc = document.MKCSS[itm].options[si].value;

	alert(window.opener.parent.main.document.styleSheets);

	if (window.opener.parent.main.document.all){
//		document.all[Obj].style.font-size = "20pt";//sc;
	} else if (window.opener.parent.main.document.layers) {
	
//		document.layers[Obj].bgColor=sc;
//		document.bgColor=sc;
	} else if (window.opener.parent.main.document.getElementById(Obj)){
		window.opener.parent.main.document.getElementById(Obj).style.size = sc;
	}else{
		alert("NG");
	}
}

function linkcolor(){
    var si  = document.MKCSS.LNKCOLOR.selectedIndex;
    var sc = document.MKCSS.LNKCOLOR.options[si].value;

    window.opener.parent.main.document.linkColor=sc;
	if(window.opener.parent.main.document.getElementsByTagName) {
		var tag;
		var	i=0;

		tag=window.opener.parent.main.document.getElementsByTagName('A.hover').item(i);
		while( tag ) {
			i++;
			tag.style.linkColor=sc;
			tag=window.opener.parent.main.document.getElementsByTagName('A.hover').item(i);
		}
	}
}

function vlinkcolor(){
    var si  = document.MKCSS.VLNKCOLOR.selectedIndex;
    var sc = document.MKCSS.VLNKCOLOR.options[si].value;

    window.opener.parent.main.document.vlinkColor=sc;
}

function alinkcolor(){
    var si  = document.MKCSS.ALNKCOLOR.selectedIndex;
    var sc = document.MKCSS.ALNKCOLOR.options[si].value;

    window.opener.parent.main.document.alinkColor=sc;
}

function	OnMouse(id)
{
	var obj=window.opener.parent.main.document.all && window.opener.parent.main.document.all(id)
		|| window.opener.parent.main.document.getElementById && window.opener.parent.main.document.getElementById(id);

	if(obj)
		obj.style.backgroundColor = document.MKCSS.ALNKCOLOR.value;
}


function	OutMouse(id,bg)
{
	var obj=window.opener.parent.main.document.all && window.opener.parent.main.document.all(id)
		|| window.opener.parent.main.document.getElementById && window.opener.parent.main.document.getElementById(id);

	if(obj)
		obj.style.backgroundColor = document.MKCSS[bg].value;
}


function	Jamp(addr,target)
{
	if(target == "here")
		location.href = addr;
	if(target == "top")
		top.window.location.href = addr;
	if(target == "top.mains")
		top.window.mains.location.href = addr;
	if(target == "main")
		parent.main.location.href = addr;
	if(target == "mains")
		parent.mains.location.href = addr;
	if(target == "left")
		parent.left.location.href = addr;
}




function ViewNews(){
    var si  = document.NEWS.LIST.selectedIndex;
    var sc = document.NEWS.LIST.options[si].value;

	if (sc!="") {
	 	var	Lnk='/cgi-bin/amusa?main.Orbis.News.ViewNews(';
		Lnk=Lnk+sc+')'
		top.location.href = Lnk;
	}
}




function ViewPlan(){
    var si  = document.PLAN.LIST.selectedIndex;
    var sc = document.PLAN.LIST.options[si].value;

	if (sc!="") {
	 	var	Lnk='/cgi-bin/amusa?main.Orbis.stay.ViewPlan(';
		Lnk=Lnk+sc+')'
		top.main.location.href = Lnk;
	}
}




function Section(itm){
    var si  = document.SECTION.LIST.selectedIndex;
    var sc = document.SECTION.LIST.options[si].value;

	if (sc!="") {
	 	var	Lnk="/"+sc+"/index.html";
//		top.mains.location.target= "top";
		window.open(Lnk);
//		top.mains.location.href = Lnk;
	}
}


var moji = "････････ＪＡＶＡスクリプトを使うとNetscapeでもIEでも文字をスクロールさせることが出来ます。";
function textscroll(  ){
	moji = moji.substring(2, moji.length) + moji.substring(0, 2);
	hyouji = moji.substring(0, 54);
	document.Mojiban.box.value = hyouji;
	setTimeout("textscroll()", 300);
}


msg="";
Timing=180;

function scroll(){
	msg=msg.substring(1,msg.length)+msg.substring(0,1);
	document.myform.mytext.value=msg;
	setTimeout("scroll()",Timing);
}

function SetScrollMsg(Text)
{
	msg=Text;
}



function SetScrollTime(sec)
{
	Timing=sec;
}



function GetParentItemValue()
{
	var	radio ;
	var	TXT="";

	radio=window.opener.document.News.VIEW;
	if (radio.length){
		for (i=0; i < radio.length; i++){
			if (radio[i].checked){
				TXT = radio[i].value;
				PTS=TXT.indexOf('%',0);
				document.News.CODENO.value=TXT.substring(0,PTS);
				PTE=TXT.indexOf('%',PTS+1);
				document.News.LINK.value=TXT.substring(PTS+1,PTE);
				PTS=PTE;
				PTE=TXT.indexOf('%',PTS+1);
				document.News.IMGLINK.value=TXT.substring(PTS+1,PTE);

				document.News.TEXT.value=TXT.substring(PTE+1,TXT.length);
				document.News.SECT_NO.value=window.opener.document.News.SECT_NO.value;
				return("");
				break;
			}
		}
		alert("項目が選択されていません.");
		window.close();
		
	}else{
		if (radio.checked){
			TXT = radio.value;
			PTS=TXT.indexOf('%',0);
			document.News.CODENO.value=TXT.substring(0,PTS);
			PTE=TXT.indexOf('%',PTS+1);
			document.News.LINK.value=TXT.substring(PTS+1,PTE);
			PTS=PTE;
			PTE=TXT.indexOf('%',PTS+1);
			document.News.IMGLINK.value=TXT.substring(PTS+1,PTE);
			document.News.TEXT.value=TXT.substring(PTE+1,TXT.length);
			document.News.SECT_NO.value=window.opener.document.News.SECT_NO.value;
		}
	}

	return(TXT);
}


function GetParentTableValue()
{
	var	radio ;


	radio=window.opener.document.News.TABLE;
	if (radio.length){
		for (i=0; i < radio.length; i++){
			if (radio[i].checked){
				TXT = radio[i].value;
				PTS=TXT.indexOf('%',0);
				document.News.CODENO.value=TXT.substring(0,PTS);
				document.News.SECT_NO.value=window.opener.document.News.SECT_NO.value;
				return("");
			}
		}
		radio=window.opener.document.News.VIEW;
		if (radio.length){
			for (i=0; i < radio.length; i++){
				if (radio[i].checked){
					TXT = radio[i].value;
					PTS=TXT.indexOf('%',0);
					document.News.CODENO.value=TXT.substring(0,PTS);
					document.News.SECT_NO.value=window.opener.document.News.SECT_NO.value;
					return("");
				}
			}
		}
		alert("項目が選択されていません.");
		window.close();
		return("")
	}else{
		if (radio.checked){
			TXT = radio.value;
			PTS=TXT.indexOf('%',0);
			document.News.CODENO.value=TXT.substring(0,PTS);
			document.News.SECT_NO.value=window.opener.document.News.SECT_NO.value;
		}else{
			radio=window.opener.document.News.VIEW;
			TXT = radio.value;
			PTS=TXT.indexOf('%',0);
			document.News.CODENO.value=TXT.substring(0,PTS);
			document.News.SECT_NO.value=window.opener.document.News.SECT_NO.value;
		}
	}
	return("");
}

