//blogBIGParts
var flVa = "test"
var swf_url = "http://www.jyoka-keikaku.jp/blogparts/blogs.swf"
var swf_url2 = "http://www.jyoka-keikaku.jp/blogparts/blogs_mini_s.swf"

function writeTagEffect(){
//	var version = deconcept.SWFObjectUtil.getPlayerVersion();
//	if (document.getElementById && (version['major'] >= 8)) {
		var html = "";

		html += "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='100%' height='100%' id='bPatM' align='middle'>";
		html += "<param name='allowScriptAccess' value='always' />";
		html += "<param name='movie' value='" + swf_url + "' />";
		html += "<param name='scale' value='noscale' />";
		html += "<param name='salign' value='lt' />";
		html += "<param name='quality' value='high' />";
		html += "<param name='wmode' value='transparent' />";
		html += "<param name='FlashVars' value='" + flVa + "' />";
		//html += "<embed src='" + swf_url + "' quality='high' scale='noscale' salign='lt' wmode='transparent' width='100%' height='100%' name='bPatM' id='bPatM' swLiveConnect=true align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent' />";
		html += "<embed src='" + swf_url + "' quality='high' scale='noscale' salign='lt' wmode='transparent' width='100%' height='100%' name='bPatM' id='bPatM' swLiveConnect=true align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent' FlashVars='" + flVa + "'/>";
		html += "</object>";
		var oLayer = document.createElement('div');
		oLayer.setAttribute('id','flVCBParts');
		oLayer.innerHTML = html;
		oLayer.style.position = 'absolute';
		oLayer.style.top = 0;
		oLayer.style.left = 0;
		oLayer.style.zIndex = 100;
		document.body.appendChild(oLayer);
		showFullWindowSize()
//	showCustomSize(window.innerWidth,window.innerHeight);

//	} else {
//	}
}

function del(){
//	document.getElementById("flVCBParts").removeChild(document.getElementById("flVCBParts").firstChild);
document.body.removeChild(document.getElementById("flVCBParts"))
}

var body = document['CSS1Compat' == document.compatMode ? 'documentElement' : 'body'];
/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */


//blogParts
function writeTag(){

//	var version = deconcept.SWFObjectUtil.getPlayerVersion();
//	if (document.getElementById && (version['major'] >= 8)) {

		var html = "";
		html += '<div align="center">';
		html += "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='150' height='220' id='bPat' align='middle'>";
		html += "<param name='allowScriptAccess' value='always' />";
		html += "<param name='movie' value='" + swf_url2 + "' />";
		html += "<param name='scale' value='noscale' />";
		html += "<param name='salign' value='lt' />";
		html += "<param name='quality' value='high' />";
		html += "<param name='wmode' value='transparent' />";
		html += "<param name='FlashVars' value='" + flVa + "' />";
		html += "<embed src='" + swf_url2 + "' quality='high' scale='noscale' salign='lt' wmode='transparent' width='150' height='220' name='bPat' id='bPat' swLiveConnect=true align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent' FlashVars='" + flVa + "'/>";
		html += "</object>";
		html += '</div>';
		
		document.write(html);
//	} else {
//	}
}


//browserCheck
function checkBrowser(){
	var uName = navigator.userAgent;
	if (uName.indexOf("Safari") > -1) return "Safari";
	if (uName.indexOf("MSIE") > -1) return "MSIE";
	if (uName.indexOf("Firefox") > -1) return "FIREFOX";
	if (uName.indexOf("Opera") > -1) return "OPERA";
	return "Netscape";
}
//OSCheck
function checkOSystem(){
	str = navigator.userAgent.toUpperCase();
	if (str.indexOf("MAC") >= 0) return "MacOS";
	if (str.indexOf("WIN") >= 0) return "Windows";
	if (str.indexOf("X11") >= 0) return "UNIX";
	return "OTHER";
}


//fullView
function showFullWindowSize(){
	//alert("showFullWindowSize");
	setValignTop();
	setAlignLeft();
	setFullWindow();
	window.onresize = function(){
		setValignTop();
		setAlignLeft();
		setFullWindow();
	}
	window.onscroll = window.onresize;
}

function clearDivSpace(){
	document.getElementById("flVCBParts").style.background = 'transparent';
}

//Layer Size ChangeView(WW:LayerWidth,HH:LayerHehight)
function showCustomSize(WW,HH){
	//alert("showCustomSize:"+WW+":"+HH);
	setValignTop();
	setAlignRight(WW);
	setLayerWidth(WW);
	setLayerHeight(HH);
	window.onresize = function(){

		setValignTop();
		setAlignLeft(WW);
		setLayerWidth(WW);
		setLayerHeight(HH);
	}
	window.onscroll = window.onresize;
}

//Layer FullWindow
function setFullWindow(){
	var browser =checkBrowser();
	var WW;
	var HH;
	if(browser == "MSIE"){
		HH = body.clientHeight;
		WW = body.clientWidth;
	}else {
		HH = window.innerHeight;
		WW = window.innerWidth;
	}
	setLayerHeight(HH);
	setLayerWidth(WW);
}

//Layer Set TopPosittion
function setValignTop(){
	var browser =checkBrowser();
	var YY;
	if(browser == "MSIE"){
		YY = body.scrollTop;
	}else {
		YY = pageYOffset;
	}
	document.getElementById("flVCBParts").style.top = YY + 'px';
}

//Layer Set Left Posittion
function setAlignLeft(){
	var XX;
	XX = 0;
	document.getElementById("flVCBParts").style.left =XX + 'px';
}

//Layer Set Right Position(layer_WW:Layer_Width)
function setAlignRight(layer_WW){
alert("wwwwwwwwwwwwwwwwwwwwwwwwwwww")
	var browser =checkBrowser() ;
	var XX;
	var WW;
	if(browser == "MSIE"){
		XX = body.scrollLeft;
		WW = body.clientWidth;
	}else {
		XX = pageXOffset;
		WW = window.innerWidth;
	}
	var dX = 0;
	if(browser != "MSIE"){
		dX = -15;
	}
	document.getElementById("flVCBParts").style.left =(WW - layer_WW + XX + dX) + 'px';
}

//Layer Width Change
function setLayerWidth(WW){
	var browser =checkBrowser() ;
	var dX = 0
	if(browser == "FIREFOX"){
		dX = -20;
	}

	document.getElementById("flVCBParts").style.width = WW+dX + 'px';
}

//Layer Height Change
function setLayerHeight(HH){
	document.getElementById("flVCBParts").style.height = HH + 'px';
}

writeTag()

