var mPath="http://1choco-1smile.jp/blogparts/"

var showJackFlag = false

var parts = ""
parts += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="160" height="295" id="blogparts"> '
parts += '<param name="allowScriptAccess" value="always" /> '
parts += '<param name="movie" value="' + mPath + 'blogparts.swf" />'
parts += '<param name="wmode" value="transparent" />'
parts += '<embed src="' + mPath + 'blogparts.swf" wmode="transparent" width="160" height="295" name="blogparts"allowScriptAccess="always"  type="application/x-shockwave-flash" /> '
parts += '</object>'

document.write(parts)
var mInsertBlock

function showJackFlash()
{
	if(mInsertBlock)
	{
		mInsertBlock = null
	}
	
	var o = getViewPort ()
	wnum = o.width;
	hnum =o.height;
	
	var hscnum = document.body.scrollLeft || document.documentElement.scrollLeft;
	var vscnum  = document.body.scrollTop  || document.documentElement.scrollTop;
	
	wnum == 0 ? wnum = 800 : wnum = wnum
	hnum == 0 ? hnum = 600 : hnum = hnum
	wnum >= 4000 ? wnum = 4000 : wnum = wnum
	hnum >= 4000 ? hnum = 4000 : hnum = hnum

	showJackFlag = true

	mInsertBlock=document.createElement("div");
	mInsertBlock.style.width=wnum+'px';
	mInsertBlock.style.height=hnum+'px';
	mInsertBlock.style.display = 'block';
	mInsertBlock.style.position='absolute';
	mInsertBlock.style.zIndex='1000';
	mInsertBlock.style.top=vscnum+'px';
	mInsertBlock.style.left=hscnum+'px';
	var tag = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="100%" />'
	tag += '<param name="allowScriptAccess" value="always" />'
	tag += '<param name="wmode" value="transparent" />'
	tag += '<param name="movie" value="'+mPath+'blogjack.swf" />'
	tag += '<embed src="'+mPath+'blogjack.swf" width="100%" height="100%" allowScriptAccess="always" type="application/x-shockwave-flash" wmode="transparent" /></object>';
	document.body.insertBefore(mInsertBlock, document.body.firstChild);
	
	mInsertBlock.innerHTML  =  tag
}

function closeSmileBlogParts()
{
	showJackFlag = false;
	mInsertBlock.style.display = "none"
}

function getViewPort () {
 	var width, heiht;
 	if (self.innerHeight) {
		// all except Explorer
		width = self.innerWidth;
		height = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		// Explorer 6 Strict Mode
		width = document.documentElement.clientWidth;
		height = document.documentElement.clientHeight;
	} else if (document.body) {
		// other Explorers
		width = document.body.clientWidth;
		height = document.body.clientHeight;
	}
	return {width: width, height: height};
}