﻿// util
function moveTo(elem, width, height, cheight) {
    var scr = {
        width  : document.body.clientWidth  || document.documentElement.clientWidth,
        height : document.documentElement.clientHeight || document.body.clientHeight,
        y : document.body.scrollTop || document.documentElement.scrollTop
    };
    elem.style.left = ((scr.width - width) / 2) + 'px';
    elem.style.top  = ((scr.height - height) / 2 + scr.y + cheight) + 'px';
}





// gettag mobile
var mobile = '';
mobile += '<div id="mobile_url2"' +
          '     style="z-index:9999;display:none;font-size:83%;width:225px;background-color:#000000; border:1px solid #696969; position:absolute">' +
          '<div style="padding:2px 5px 0 0;text-align:right;font-size:75% top:0px; left:0px;">' +
          '<a href="javascript:void(0)" onclick="document.getElementById(\'mobile_url2\').style.display = \'none\'"><font color="#ffffff">×閉じる</font></a></div>' +
          '<div style="padding:5px;background-color:#808080;border:2px solid #696969;">' +
          '<div>' +
          '↓着うた&reg;の配信サイトはこちら!!↓<br /><img src="http://blog.hw-ch.com/01/toshimobile.jpg" style="margin:3px;"></div>' +
          '<br style="clear:both;" />' +
          '<div>' +
          '<img src="http://blog.hw-ch.com/01/music-jp.jpg" style="margin:3px;" /></div>' +
          '<br style="clear:both;" />' +
          '</div>' +
          '</div>';

function disp_gettag_dialog_code4(event) {
    var dlg = document.getElementById('mobile_url2');
    if ( dlg.style.display == 'block' ) return;
    moveTo(dlg, 425, 644, 370);
    dlg.style.display = 'block';
}




// imagerollover
function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");

		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}



document.write(mobile);
document.write('<div style="margin:0; padding:35px 0 0 0; width:160px; height:380px; text-align:center; background:#333 url(http://blog.hw-ch.com/01/img/back.jpg) no-repeat center top;" id="clock_parts-01">');
document.write('<OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="150" HEIGHT="195" id="clockp-02" ALIGN="">');
document.write('<PARAM NAME="allowScriptAccess" VALUE="sameDomain">');
document.write('<PARAM NAME="movie" VALUE="http://blog.hw-ch.com/01/clockp-02.swf">');
document.write('<PARAM NAME="menu" VALUE="false">');
document.write('<PARAM NAME="quality" VALUE="high">');
document.write('<EMBED src="http://blog.hw-ch.com/01/clockp-02.swf" menu="false" quality="high" WIDTH="150" HEIGHT="195" NAME="clockp-02" align=""  allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
document.write('</EMBED>');
document.write('</OBJECT>');
document.write('<div style="text-align:center;padding:1px 0;"><a href="http://store.toshi-official.com/" target="_blank"><img src="http://blog.hw-ch.com/01/img/CD_buy_off.jpg" border="0" width="144" height="21" name="cdbuy"></a></div>');
document.write('<div style="text-align:center;padding:1px 0;"><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?id=296395839&s=143462" target="_blank"><img src="http://blog.hw-ch.com/01/img/itunes_buy_off.jpg" border="0" width="144" height="21"></a></div>');
document.write('<div style="text-align:center;padding:1px 0;"><a href="javascript:void(0)" onclick="javascript:disp_gettag_dialog_code4(event)"><img src="http://blog.hw-ch.com/01/img/chakuutaget_off.jpg" border="0" width="144" height="21"></a></div>');
document.write('<div style="text-align:center;padding:1px 0;"><a href="http://www.hw-ch.com/blogparts.html" target="_blank"><img src="http://blog.hw-ch.com/01/img/blogparts_code_off.jpg" border="0" width="144" height="21"></a></div>');
document.write('<div style="text-align:center;padding:1px 0;"><a href="http://www.hw-ch.com" target="_blank"><img src="http://blog.hw-ch.com/01/img/banner.gif" border="0" style="margin-bottom:3px;"></a></div>');
document.write('<span style="font-size:7px; color:#ffffff;"><a href="http://www.hw-ch.com" target="_blank" style="color:#ffffff;">&copy; HWch.All Rights Riserved.</a></span>');
document.write('</div>');
