if (thisDIR == 1) {
	imgPath = "image/common/";
} else if (thisDIR == 2) {
	imgPath = "../image/common/";
} else if (thisDIR == 3) {
	imgPath = "../../image/common/";
}

var onSound="<embed type='application/x-mplayer2'" //off
            +  "pluginspage='http://www.microsoft.com/Windows/MediaPlayer/'"
            +  "name='bgm'"
            +  "src='sound.wax'"
            +  "width='200'  height='0'"
            +  "showstatusbar='0'"
            +  "showcontrols='0'"
            +  "mute='0'"
            +  "autostart='1'"
            +  "playcount='-1'></embed>";
var offSound="<embed type='application/x-mplayer2'" //off
            +  "pluginspage='http://www.microsoft.com/Windows/MediaPlayer/'"
            +  "name='bgm'"
            +  "src='sound.wax'"
            +  "width='200'  height='0'"
            +  "showstatusbar='0'"
            +  "showcontrols='0'"
            +  "mute='1'"
            +  "autostart='1'"
            +  "playcount='-1'></embed>";

function SoundCheck() {
	if (parent.bgm.Smute) { //試聴ページ
		Soff();
		parent.bgm.Smute = false;
	} else {
		if (!parent.bgm.Splay) {
			document.soundimg.src = imgPath + "head_sound_on.gif";
			document.soundimg.title = "ＢＧＭをオンにする";
		} 
	}
}

function Son() {
	parent.bgm.document.getElementById('inn').innerHTML = onSound;
	parent.bgm.Splay = true;
	document.soundimg.src = imgPath + "head_sound_off.gif";
	document.soundimg.title = "ＢＧＭをオフにする";
}
function Soff() {
	parent.bgm.document.getElementById('inn').innerHTML = offSound;
	parent.bgm.Splay = false;
	document.soundimg.src = imgPath + "head_sound_on.gif";
	document.soundimg.title = "ＢＧＭをオンにする";
}

function players() {
	if (parent.bgm.Splay) {
		Soff();
	} else {
		Son();
	}	
}

function header() {
document.open();
document.write('<a name="top"></a>');
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0" background="' + imgPath + 'head_bg.gif">');
document.write('<tr><td>');
if (thisDIR == 2) {
	document.write('<a href="../body.html">');
} else if (thisDIR == 3) {
	document.write('<a href="../../body.html">');
}
document.write('<img src="' + imgPath + 'head_logo.gif" width="270" height="51" alt="Sumiko’s official site Cleazation" border="0" title="HOMEへ戻る"');
if (thisDIR != 1) {
	document.write(' title="HOMEへ戻る"></a>');
} else {	document.write('>');	}
document.write('</td><td class="head-panel">');
if (thisDIR == 2) {
	document.write('<a href="../member/">');
} else if (thisDIR == 3) {
	document.write('<a href="../../member/">');
} else {
	document.write('<a href="member/">');
}
document.write('<img src="' + imgPath + 'head_maga.gif" width="106" height="14" alt="メルマガのお申込み" border="0" class="head-mailbtn"></a>');
document.write('<a href="javascript:players();">');
document.write('<img src="' + imgPath + 'head_sound_off.gif" width="75" height="14" alt="Sound" title="ＢＧＭをオフにする" name="soundimg" border="0" onClick="window.event.srcElement.blur();"></a></td></tr></table>');
document.close();
}

function footer(ver) {
var now = new Date();
var year = now.getFullYear();

document.open();
if (ver == "0") {
	document.write('<table class="footer-ver1" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">');
}
if (ver == "1") {
	document.write('<img src="' + imgPath + 'sprit_flower.gif" class="footer-line" border="0"><br>');
	document.write('<table class="footer-ver1" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">');
}
if (ver == "2") {
	document.write('<table class="footer-ver2" border="0" cellspacing="0" cellpadding="0"><tr><td valign="bottom">');
}
if (ver == "3") {
	document.write('<table class="footer-ver3" border="0" cellspacing="0" cellpadding="0"><tr><td valign="bottom">');
}
if (ver == "4" || ver=="5") {
	document.write('<img src="' + imgPath + 'sprit_flower.gif" class="footer-line" border="0"><br>');
	document.write('<table class="footer-ver1" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top" align="center">');
	document.write('<span style="margin-top:5px; float:center; font-size:80%; width:300px;">');
}
if (ver == "4") {
	document.write('<a href="tokutei.html" target="_blank" style="text-decoration:none;"><font color="#896550">特定商取引法に基づく表示</font></a>');
	document.write('　|　<a href="privacy.html" target="_blank" style="text-decoration:none;"><font color="#896550">プライバシーポリシー</font></a></span>');
}
if (ver == "5") {
	document.write('<a href="../tokutei.html" target="_blank" style="text-decoration:none;"><font color="#896550">特定商取引法に基づく表示</font></a>');
	document.write('　|　<a href="../privacy.html" target="_blank" style="text-decoration:none;"><font color="#896550">プライバシーポリシー</font></a></span>');
}
document.write('<a href="#top"><span class="pagetop-text textS">PAGE TOP▲</span></a></span>');
document.write('</td></tr></table>');
document.write('<div class="footer-box"><span class="textS">Copyright (C) '+year+' Cleazation.com All Rights Reserved.</span></div>');
document.close();
}