MAC = navigator.userAgent.indexOf('Mac') != -1;
WIN = navigator.userAgent.indexOf("Windows") != -1
NN = navigator.appName.indexOf('Netscape') != -1;
IE = navigator.appName.indexOf('Microsoft') != -1;
VER = navigator.appVersion.charAt(0);
if (NN) window.onresize = redraw;
function redraw() { location.reload(); }
key = '/promotion/';
baseHREF = location.href.substring(0,location.href.indexOf(key) + key.length);
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="'+baseHREF+'set/' + (MAC ? 'mac' : 'win') + '.css">');
if (MAC && IE) {
	document.write('<STYLE TYPE="text/css">');
	document.write('LI { margin-left:16px; }');
	document.write('</STYLE>');
}
TO = 0;

if (document.images) {
	mg = new Array();
	for (i = 0; i < 20 * 2; i++) {
		mg[i] = new Image();
		mg[i].src = baseHREF+'img/m_g' + Math.floor(i / 2) + (i % 2 == 0 ? '.gif' : 'a.gif');
	}
}

function GI(n) { if (document.images) document.images['G' + n].src = mg[n * 2 + 1].src; }
function GO(n) { if (document.images) document.images['G' + n].src = mg[n * 2].src; }

flash = 0;
if (navigator.mimeTypes && navigator.mimeTypes['application/x-shockwave-flash']) {
	var plugin = navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin;
	if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf('.') - 1)) >= 4)
		flash = 1;
} else if (WIN && IE && navigator.userAgent.indexOf('Windows 3.1') == -1) {
	flash = 1;
} else if (MAC && IE && navigator.appVersion.indexOf('MSIE 4') != -1) {
	flash = 1;
}

function wrMenu() {
	d = document;
	if (IE) d.write('<DIV ID=PM STYLE="position:absolute; left:0px; top:193px; z-index:10; background-color:#002754; visibility:hidden; filter:alpha(opacity=75);" onMouseOver="PI(0)" onMouseOut="PO(0)">');
	if (NN) d.write('<LAYER NAME=PM LEFT=0 TOP=193 Z-INDEX=10 VISIBILITY=hidden BGCOLOR=#002754 onMouseOver="PI(0)" onMouseOut="PO(0)">');
	d.write('<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>');
	d.write('<TR><TD><IMG SRC="'+baseHREF+'img/sp.gif" WIDTH=2 HEIGHT=12 ALT=""></TD></TR>');
	d.write('<TR><TD ALIGN=right><A HREF="'+baseHREF+'guide/nyukai.html" CLASS=PM>' + menuStr[0] + '<IMG SRC="'+baseHREF+'img/pm_arrow.gif" WIDTH=18 HEIGHT=11 BORDER=0 ALT=""></A></TD></TR>');
	d.write('<TR><TD><IMG SRC="'+baseHREF+'img/pm_sep.gif" WIDTH=168 HEIGHT=7 ALT=""></TD></TR>');
	d.write('<TR><TD ALIGN=right><A HREF="'+baseHREF+'guide/yakkan.html" CLASS=PM>' + menuStr[1] + '<IMG SRC="'+baseHREF+'img/pm_arrow.gif" WIDTH=18 HEIGHT=11 BORDER=0 ALT=""></A></TD></TR>');
	d.write('<TR><TD><IMG SRC="'+baseHREF+'img/pm_sep.gif" WIDTH=168 HEIGHT=7 ALT=""></TD></TR>');
	d.write('<TR><TD ALIGN=right><A HREF="'+baseHREF+'guide/kiyaku.html" CLASS=PM>' + menuStr[2] + '<IMG SRC="'+baseHREF+'img/pm_arrow.gif" WIDTH=18 HEIGHT=11 BORDER=0 ALT=""></A></TD></TR>');
	d.write('<TR><TD><IMG SRC="'+baseHREF+'img/pm_sep.gif" WIDTH=168 HEIGHT=7 ALT=""></TD></TR>');
	d.write('<TR><TD ALIGN=right><A HREF="'+baseHREF+'guide/toiawase.html" CLASS=PM>' + menuStr[3] + '<IMG SRC="'+baseHREF+'img/pm_arrow.gif" WIDTH=18 HEIGHT=11 BORDER=0 ALT=""></A></TD></TR>');
	d.write('<TR><TD><IMG SRC="'+baseHREF+'img/pm_sep.gif" WIDTH=168 HEIGHT=7 ALT=""></TD></TR>');
	d.write('<TR><TD><IMG SRC="'+baseHREF+'img/sp.gif" WIDTH=2 HEIGHT=6 ALT=""></TD></TR>');
	d.write('</TABLE>');
	if (IE) d.write('</DIV>');
	if (NN) d.write('</LAYER>');
}

function wrFooter() {
	d = document;
	d.write('<CENTER>');
	d.write('<IMG SRC="'+baseHREF+'img/sep.gif" WIDTH=682 HEIGHT=3 ALT=""><BR>');
	d.write('<TABLE BORDER=0 CELLSPACING=6 CELLPADDING=0>');
	d.write('<TR><TD><A HREF="http://www.nttcom.co.jp/"><IMG SRC="'+baseHREF+'img/nttcomware.gif" WIDTH=137 HEIGHT=26 BORDER=0 ALT="NTT COMWARE"></A></TD>');
	d.write('	<TD><FONT SIZE=-1 CLASS=ST>COPYRIGHT NTT COMWARE CORPORATION,2000-2002<BR>ALLRIGHTS RESERVED</FONT></TD></TR>');
	d.write('</TABLE>');
	d.write('</CENTER>');
}

function PI() {
	clearTimeout(TO);
	if (IE) {
		PM.style.posLeft = Math.floor((document.body.clientWidth - 682) / 2) + 92;
		PM.style.visibility = 'visible';
	}
	if (NN) {
		document.PM.left = Math.floor((innerWidth - 682) / 2) + 92 - 8;
		document.PM.visibility = true;
	}
}

function PO() {
	if (IE) {
		TO = setTimeout('PM.style.visibility = \'hidden\'', 50);
	}
	if (NN) {
		TO = setTimeout('document.PM.visibility = false', 50);
	}
}
