/*
Macromedia(r) Flash(r) JavaScript Integration Kit License


Copyright (c) 2005 Macromedia, inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment:

"This product includes software developed by Macromedia, Inc.
(http://www.macromedia.com)."

Alternately, this acknowledgment may appear in the software itself, if and
wherever such third-party acknowledgments normally appear.

4. The name Macromedia must not be used to endorse or promote products derived
from this software without prior written permission. For written permission,
please contact devrelations@macromedia.com.

5. Products derived from this software may not be called "Macromedia" or
"Macromedia Flash", nor may "Macromedia" or "Macromedia Flash" appear in their
name.

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MACROMEDIA OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

--

This code is part of the Flash / JavaScript Integration Kit:
http://www.macromedia.com/go/flashjavascript/

Created by:

Christian Cantrell
http://weblogs.macromedia.com/cantrell/
mailto:cantrell@macromedia.com

Mike Chambers
http://weblogs.macromedia.com/mesh/
mailto:mesh@macromedia.com

Macromedia
*/

/**
 * Create a new Exception object.
 * name: The name of the exception.
 * message: The exception message.
 */
function Exception(name, message)
{
    if (name)
        this.name = name;
    if (message)
        this.message = message;
}

/**
 * Set the name of the exception. 
 */
Exception.prototype.setName = function(name)
{
    this.name = name;
}

/**
 * Get the exception's name. 
 */
Exception.prototype.getName = function()
{
    return this.name;
}

/**
 * Set a message on the exception. 
 */
Exception.prototype.setMessage = function(msg)
{
    this.message = msg;
}

/**
 * Get the exception message. 
 */
Exception.prototype.getMessage = function()
{
    return this.message;
}

/**
 * Generates a browser-specific Flash tag. Create a new instance, set whatever
 * properties you need, then call either toString() to get the tag as a string, or
 * call write() to write the tag out.
 */

/**
 * Creates a new instance of the FlashTag.
 * src: The path to the SWF file.
 * width: The width of your Flash content.
 * height: the height of your Flash content.
 */
function FlashTag(src, width, height)
{
    this.src       = src;
    this.width     = width;
    this.height    = height;
    this.version   = '7,0,14,0';
    this.id        = null;
    this.bgcolor   = 'ffffff';
    this.flashVars = null;
}

/**
 * Sets the Flash version used in the Flash tag.
 */
FlashTag.prototype.setVersion = function(v)
{
    this.version = v;
}

/**
 * Sets the ID used in the Flash tag.
 */
FlashTag.prototype.setId = function(id)
{
    this.id = id;
}

/**
 * Sets the background color used in the Flash tag.
 */
FlashTag.prototype.setBgcolor = function(bgc)
{
    this.bgcolor = bgc;
}

/**
 * Sets any variables to be passed into the Flash content. 
 */
FlashTag.prototype.setFlashvars = function(fv)
{
    this.flashVars = fv;
}

/**
 * Get the Flash tag as a string. 
 */
FlashTag.prototype.toString = function()
{
    var ie = (navigator.appName.indexOf ("Microsoft") != -1) ? 1 : 0;
    var flashTag = new String();
    if (ie)
    {
        flashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
        if (this.id != null)
        {
            flashTag += 'id="'+this.id+'" ';
        }
        flashTag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+this.version+'" ';
        flashTag += 'width="'+this.width+'" ';
        flashTag += 'height="'+this.height+'">';
        flashTag += '<param name="movie" value="'+this.src+'"/>';
        flashTag += '<param name="quality" value="high"/>';
        flashTag += '<param name="bgcolor" value="#'+this.bgcolor+'"/>';
        if (this.flashVars != null)
        {
            flashTag += '<param name="flashvars" value="'+this.flashVars+'"/>';
        }
        flashTag += '</object>';
    }
    else
    {
        flashTag += '<embed src="'+this.src+'" ';
        flashTag += 'quality="high" '; 
        flashTag += 'bgcolor="#'+this.bgcolor+'" ';
        flashTag += 'width="'+this.width+'" ';
        flashTag += 'height="'+this.height+'" ';
        flashTag += 'type="application/x-shockwave-flash" ';
        if (this.flashVars != null)
        {
            flashTag += 'flashvars="'+this.flashVars+'" ';
        }
        if (this.id != null)
        {
            flashTag += 'name="'+this.id+'" ';
        }
        flashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
        flashTag += '</embed>';
    }
    return flashTag;
}

/**
 * Write the Flash tag out. Pass in a reference to the document to write to. 
 */
FlashTag.prototype.write = function(doc)
{
    doc.write(this.toString());
}

/**
 * The FlashSerializer serializes JavaScript variables of types object, array, string,
 * number, date, boolean, null or undefined into XML. 
 */

/**
 * Create a new instance of the FlashSerializer.
 * useCdata: Whether strings should be treated as character data. If false, strings are simply XML encoded.
 */
function FlashSerializer(useCdata)
{
    this.useCdata = useCdata;
}

/**
 * Serialize an array into a format that can be deserialized in Flash. Supported data types are object,
 * array, string, number, date, boolean, null, and undefined. Returns a string of serialized data.
 */
FlashSerializer.prototype.serialize = function(args)
{
    var qs = new String();

    for (var i = 0; i < args.length; ++i)
    {
        switch(typeof(args[i]))
        {
            case 'undefined':
                qs += 't'+(i)+'=undf';
                break;
            case 'string':
                qs += 't'+(i)+'=str&d'+(i)+'='+escape(args[i]);
                break;
            case 'number':
                qs += 't'+(i)+'=num&d'+(i)+'='+escape(args[i]);
                break;
            case 'boolean':
                qs += 't'+(i)+'=bool&d'+(i)+'='+escape(args[i]);
                break;
            case 'object':
                if (args[i] == null)
                {
                    qs += 't'+(i)+'=null';
                }
                else if (args[i] instanceof Date)
                {
                    qs += 't'+(i)+'=date&d'+(i)+'='+escape(args[i].getTime());
                }
                else // array or object
                {
                    try
                    {
                        qs += 't'+(i)+'=xser&d'+(i)+'='+escape(this._serializeXML(args[i]));
                    }
                    catch (exception)
                    {
                        throw new Exception("FlashSerializationException",
                                            "The following error occurred during complex object serialization: " + exception.getMessage());
                    }
                }
                break;
            default:
                throw new Exception("FlashSerializationException",
                                    "You can only serialize strings, numbers, booleans, dates, objects, arrays, nulls, and undefined.");
        }

        if (i != (args.length - 1))
        {
            qs += '&';
        }
    }

    return qs;
}

/**
 * Private
 */
FlashSerializer.prototype._serializeXML = function(obj)
{
    var doc = new Object();
    doc.xml = '<fp>'; 
    this._serializeNode(obj, doc, null);
    doc.xml += '</fp>'; 
    return doc.xml;
}

/**
 * Private
 */
FlashSerializer.prototype._serializeNode = function(obj, doc, name)
{
    switch(typeof(obj))
    {
        case 'undefined':
            doc.xml += '<undf'+this._addName(name)+'/>';
            break;
        case 'string':
            doc.xml += '<str'+this._addName(name)+'>'+this._escapeXml(obj)+'</str>';
            break;
        case 'number':
            doc.xml += '<num'+this._addName(name)+'>'+obj+'</num>';
            break;
        case 'boolean':
            doc.xml += '<bool'+this._addName(name)+' val="'+obj+'"/>';
            break;
        case 'object':
            if (obj == null)
            {
                doc.xml += '<null'+this._addName(name)+'/>';
            }
            else if (obj instanceof Date)
            {
                doc.xml += '<date'+this._addName(name)+'>'+obj.getTime()+'</date>';
            }
            else if (obj instanceof Array)
            {
                doc.xml += '<array'+this._addName(name)+'>';
                for (var i = 0; i < obj.length; ++i)
                {
                    this._serializeNode(obj[i], doc, null);
                }
                doc.xml += '</array>';
            }
            else
            {
                doc.xml += '<obj'+this._addName(name)+'>';
                for (var n in obj)
                {
                    if (typeof(obj[n]) == 'function')
                        continue;
                    this._serializeNode(obj[n], doc, n);
                }
                doc.xml += '</obj>';
            }
            break;
        default:
            throw new Exception("FlashSerializationException",
                                "You can only serialize strings, numbers, booleans, objects, dates, arrays, nulls and undefined");
            break;
    }
}

/**
 * Private
 */
FlashSerializer.prototype._addName= function(name)
{
    if (name != null)
    {
        return ' name="'+name+'"';
    }
    return '';
}

/**
 * Private
 */
FlashSerializer.prototype._escapeXml = function(str)
{
    if (this.useCdata)
        return '<![CDATA['+str+']]>';
    else
        return str.replace(/&/g,'&amp;').replace(/</g,'&lt;');
}

/**
 * The FlashProxy object is what proxies function calls between JavaScript and Flash.
 * It handles all argument serialization issues.
 */

/**
 * Instantiates a new FlashProxy object. Pass in a uniqueID and the name (including the path)
 * of the Flash proxy SWF. The ID is the same ID that needs to be passed into your Flash content as lcId.
 */
function FlashProxy(uid, proxySwfName)
{
    this.uid = uid;
    this.proxySwfName = proxySwfName;
    this.flashSerializer = new FlashSerializer(false);
}

/**
 * Call a function in your Flash content.  Arguments should be:
 * 1. ActionScript function name to call,
 * 2. any number of additional arguments of type object,
 *    array, string, number, boolean, date, null, or undefined. 
 */
FlashProxy.prototype.call = function()
{

    if (arguments.length == 0)
    {
        throw new Exception("Flash Proxy Exception",
                            "The first argument should be the function name followed by any number of additional arguments.");
    }

    var qs = 'lcId=' + escape(this.uid) + '&functionName=' + escape(arguments[0]);

    if (arguments.length > 1)
    {
        var justArgs = new Array();
        for (var i = 1; i < arguments.length; ++i)
        {
            justArgs.push(arguments[i]);
        }
        qs += ('&' + this.flashSerializer.serialize(justArgs));
    }

    var divName = '_flash_proxy_' + this.uid;
    if(!document.getElementById(divName))
    {
        var newTarget = document.createElement("div");
        newTarget.id = divName;
        document.body.appendChild(newTarget);
    }
    var target = document.getElementById(divName);
    var ft = new FlashTag(this.proxySwfName, 1, 1);
    ft.setVersion('6,0,65,0');
    ft.setFlashvars(qs);
    target.innerHTML = ft.toString();
}

/**
 * This is the function that proxies function calls from Flash to JavaScript.
 * It is called implicitly.
 */
FlashProxy.callJS = function()
{
    var functionToCall = eval(arguments[0]);
    var argArray = new Array();
    for (var i = 1; i < arguments.length; ++i)
    {
        argArray.push(arguments[i]);
    }
    functionToCall.apply(functionToCall, argArray);
}





/**
 * SWFObject v2.0: 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
 *
 */
if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
	if (!document.getElementById) { return; }
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params = new Object();
	this.variables = new Object();
	this.attributes = new Array();
	if(swf) { this.setAttribute('swf', swf); }
	if(id) { this.setAttribute('id', id); }
	if(w) { this.setAttribute('width', w); }
	if(h) { this.setAttribute('height', h); }
	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
	if (!window.opera && document.all && this.installedVer.major > 7) {
		// only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
		deconcept.SWFObject.doPrepUnload = true;
	}
	if(c) { this.addParam('bgcolor', c); }
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.setAttribute('useExpressInstall', false);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
	useExpressInstall: function(path) {
		this.xiSWFPath = !path ? "expressinstall.swf" : path;
		this.setAttribute('useExpressInstall', true);
	},
	setAttribute: function(name, value){
		this.attributes[name] = value;
	},
	getAttribute: function(name){
		return this.attributes[name];
	},
	addParam: function(name, value){
		this.params[name] = value;
	},
	getParams: function(){
		return this.params;
	},
	addVariable: function(name, value){
		this.variables[name] = value;
	},
	getVariable: function(name){
		return this.variables[name];
	},
	getVariables: function(){
		return this.variables;
	},
	getVariablePairs: function(){
		var variablePairs = new Array();
		var key;
		var variables = this.getVariables();
		for(key in variables){
			variablePairs.push(key +"="+ variables[key]);
		}
		return variablePairs;
	},
	getSWFHTML: function() {
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
			if (this.getAttribute("doExpressInstall")) {
				this.addVariable("MMplayerType", "PlugIn");
				this.setAttribute('swf', this.xiSWFPath);
			}
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} else { // PC IE
			if (this.getAttribute("doExpressInstall")) {
				this.addVariable("MMplayerType", "ActiveX");
				this.setAttribute('swf', this.xiSWFPath);
			}
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			var params = this.getParams();
			for(var key in params) {
			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
			}
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			swfNode += "</object>";
		}
		return swfNode;
	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) {
			// check to see if we need to do an express install
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
				this.setAttribute('doExpressInstall', true);
				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
				this.addVariable("MMdoctitle", document.title);
			}
		}
		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}else{
			if(this.getAttribute('redirectUrl') != "") {
				document.location.replace(this.getAttribute('redirectUrl'));
			}
		}
		return false;
	}
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else{
		// do minor version lookup in IE, but avoid fp6 crashing issues
		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
		try{
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		}catch(e){
			try {
				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
				axo.AllowScriptAccess = "always"; // throws if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
			} catch(e) {
				if (PlayerVersion.major == 6) {
					return PlayerVersion;
				}
			}
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			} catch(e) {}
		}
		if (axo != null) {
			PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
		}
	}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
	this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
	this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
	this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
	getRequestParameter: function(param) {
		var q = document.location.search || document.location.hash;
		if(q) {
			var pairs = q.substring(1).split("&");
			for (var i=0; i < pairs.length; i++) {
				if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
					return pairs[i].substring((pairs[i].indexOf("=")+1));
				}
			}
		}
		return "";
	}
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
	var objects = document.getElementsByTagName("OBJECT");
	for (var i=0; i < objects.length; i++) {
		objects[i].style.display = 'none';
		for (var x in objects[i]) {
			if (typeof objects[i][x] == 'function') {
				objects[i][x] = function(){};
			}
		}
	}
}
// fixes bug in fp9 see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
if (deconcept.SWFObject.doPrepUnload) {
	deconcept.SWFObjectUtil.prepUnload = function() {
		__flash_unloadHandler = function(){};
		__flash_savedUnloadHandler = function(){};
		window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);
	}
	window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
}
/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;




























	



//----------------------------------------------------------------------------------------------------------------------------------------------------------------//
//		Pinky uranai JS
//----------------------------------------------------------------------------------------------------------------------------------------------------------------//
var waterShinyBPObject = new Object();
//----------------------------------------------------------------------------------------------------------------------------------------------------------------//
//		INIT
//----------------------------------------------------------------------------------------------------------------------------------------------------------------//
function waterShinyBP_init(_w,_h){	
	waterShinyBPObject.otherSwfContainerList = new Array();
	waterShinyBPObject.bNotResize = false;
	waterShinyBPObject.movieWidth = _w;
	waterShinyBPObject.pxyBlogParts = "blogparts";
	waterShinyBPObject.bIE = /*@cc_on!@*/false;
	waterShinyBPObject.ua = 	navigator.userAgent;
	waterShinyBPObject.bSafari = (waterShinyBPObject.ua.indexOf("Safari")!=-1);
	if(waterShinyBPObject.ua.indexOf("Windows") > -1){
		waterShinyBPObject.bWin = true;
	}
	if (waterShinyBPObject.ua.match(/Gecko/)) {
		if (waterShinyBPObject.ua.match(/(Firebird|Firefox)\/([\.\d]+)/)) {
			waterShinyBPObject.bFoxy = true;
		}
	}
	if(window.opera){
		waterShinyBPObject.bOpera = true;
	}
	if (waterShinyBPObject.bIE && typeof document.body.style.maxHeight != "undefined") {
		waterShinyBPObject.bIE7 = true;
	}
	waterShinyBPObject.body = document["CSS1Compat" == document.compatMode ? "documentElement":"body"];	
	var uidApmBlogparts_float = "waterShinyBP_float";
	var uidApmBlogparts_main = "uidApmBlogparts_main";
	var pxywaterShinyBP_float = new FlashProxy(uidApmBlogparts_float, 'http://www.watershiny.jp/download/blogparts/counseling_08sp/swf/JavaScriptFlashGateway.swf');
	var pxywaterShinyBP_main = new FlashProxy(uidApmBlogparts_main, 'http://www.watershiny.jp/download/blogparts/counseling_08sp/swf/JavaScriptFlashGateway.swf');
	//	-----------------------------------------------------------------------------------------------------------------------------------------------------------//
	//		ATTACH BLOG PARTS
	//	-----------------------------------------------------------------------------------------------------------------------------------------------------------//
	waterShinyBPObject.attachBlogParts = function(){
		//var htmlBuffer = '<div id="waterShinyBP_float'+_w+'" style="visibility:hidden;">';
		var htmlBuffer = '<div id="waterShinyBP_float'+_w+'">';
		var so = new SWFObject('http://www.watershiny.jp/download/blogparts/counseling_08sp/swf/header.swf', 'waterShinyBP_float', _w, _h, '8', '#191919');
		so.addParam("allowScriptAccess", "always");
		so.addParam('wmode', 'transparent');
		so.addVariable("url", document.URL);
		so.addVariable("movieWidth", this.movieWidth);
		so.addVariable("lcId", pxywaterShinyBP_float);
		//htmlBuffer += so.getSWFHTML();
		htmlBuffer += '<a href="javascript:waterShinyBPOpenMain();"><img src="http://www.watershiny.jp/counseling/img/main_image.jpg" border="0" /></a>';
		htmlBuffer += '</div>';
		document.write(htmlBuffer);
	}
	//	-----------------------------------------------------------------------------------------------------------------------------------------------------------//
	//		ATTACH MAIN SWF
	//	-----------------------------------------------------------------------------------------------------------------------------------------------------------//	
	waterShinyBPObject.attachMain = function(){
		mainContainer = document.createElement("div");
		mainContainer.setAttribute("id","waterShinyBP_main");
		mainContainer.style.zIndex = "10001";
		mainContainer.style.position = "absolute";
		mainContainer.style.width = this.getWidth() + "px";
		mainContainer.style.height = this.getHeight() + "px";
		document.body.appendChild(mainContainer);
		/*
		if(this.bIE7){
			mainContainer.style.left = "-9999px";
			this.bNotResize = true;
		}else	if(!this.bIE){
			mainContainer.style.visibility='hidden';
		}
		*/
		var soMain = new SWFObject('http://www.watershiny.jp/download/blogparts/counseling_08sp/swf/main.swf', 'preloader', '100%', '100%', '8', '#ffffff');
		soMain.addParam("allowScriptAccess", "always");
		soMain.addParam('wmode', 'transparent'); 
		soMain.addVariable("url", document.URL);
		soMain.addVariable("lcId", uidApmBlogparts_main);
		soMain.addVariable("pinkyID", waterShinyBPObject.pinkyID);	
		mainContainer.innerHTML = soMain.getSWFHTML();
		this.replaceResize();
		//document.getElementsByTagName('body')[0].appendChild(faderContainer);
}

	waterShinyBPObject.removeMain = function(){
		var mainContainer = document.getElementById('waterShinyBP_main');
		//var mainNode = mainContainer.childNodes[0];
		while(mainContainer.firstChild){
			mainContainer.removeChild(mainContainer.firstChild);
		}
		//mainContainer.style.display = 'none';
		document.body.removeChild(mainContainer);
	}	
	//	-----------------------------------------------------------------------------------------------------------------------------------------------------------//
	//		IN/VISIBLE OTHER OBJECT
	//	-----------------------------------------------------------------------------------------------------------------------------------------------------------//
	waterShinyBPObject.hideOther = function(){
		this.hideOtherObject(document.getElementsByTagName('object'));
		this.hideOtherObject(document.getElementsByTagName('embed'));
		this.hideOtherObject(document.getElementsByTagName('select'));
		this.hideOtherObject(document.getElementsByTagName('iframe'));	
	}
		//	-----------------------------------------------------------------------------------------------------------------------------------------------------------//
		//		INVISIBLE OTHER OBJECT
		//	-----------------------------------------------------------------------------------------------------------------------------------------------------------//
	waterShinyBPObject.hideOtherObject = function(_arg){
		var tmpList = _arg.length;
		for( var i=0; i<tmpList; i++ ){
			if( _arg[i].style.visibility != 'hidden' ){
				if(_arg[i].id.indexOf("waterShinyBP_") == -1){
					waterShinyBPObject.otherSwfContainerList.push(_arg[i]);
					_arg[i].style.visibility='hidden';
				}
			}
		}		
	}
		//	-----------------------------------------------------------------------------------------------------------------------------------------------------------//
		//		INVISIBLE OTHER OBJECT
		//	-----------------------------------------------------------------------------------------------------------------------------------------------------------//
	waterShinyBPObject.respawnOtherObject = function(){
		for( var i=0; i<waterShinyBPObject.otherSwfContainerList.length; i++ ){
			waterShinyBPObject.otherSwfContainerList[i].style.visibility = 'visible';
		}
	}	
//----------------------------------------------------------------------------------------------------------------------------------------------------------------//
//		get Scroll / Size
//----------------------------------------------------------------------------------------------------------------------------------------------------------------//
waterShinyBPObject.getScrollX = function(){
	var returnVal;
	if(this.bOpera){
		returnVal = window.pageXOffset;
	}else if(document.all && document.getElementById && (document.compatMode == 'CSS1Compat')){
		returnVal = document.documentElement.scrollLeft;
	}else if(document.all){
		returnVal = document.body.scrollLeft;
	}else if(!document.all && (document.layers || document.getElementById)){
		returnVal = window.pageXOffset;
	}
	return returnVal;
}

waterShinyBPObject.getScrollY = function(){
	var returnVal;
	if(this.bOpera){
		returnVal = window.pageYOffset;
	}else if(document.all && document.getElementById && (document.compatMode == 'CSS1Compat')){
		returnVal = document.documentElement.scrollTop;
	}else if(document.all){
		returnVal = document.body.scrollTop;
	}else if(!document.all && (document.layers || document.getElementById)){
		returnVal = window.pageYOffset;
	}
	return returnVal;
}

waterShinyBPObject.getWidth = function(){
	var returnVal;
	if(this.bOpera){
		returnVal = document.body.clientWidth;
	}else if(waterShinyBPObject.bSafari){
		returnVal = document.body.clientWidth+24;
	}else if(document.all && document.getElementById && (document.compatMode == 'CSS1Compat')){
		returnVal = document.documentElement.clientWidth;
	}else if(document.all){
		returnVal = document.body.clientWidth;
	}else if(!document.all && (document.layers || document.getElementById)){
		returnVal = window.waterShinyBPObject.body.clientWidth;
		//returnVal = window.innerHeight;
	}
	return returnVal;
}


waterShinyBPObject.getHeight = function(){
	var returnVal;
	if(this.bOpera){
		returnVal = document.body.clientHeight;
	}else if(document.all && document.getElementById && (document.compatMode == 'CSS1Compat')){
		returnVal = document.documentElement.clientHeight;
	}else if(document.all){
		returnVal = document.body.clientHeight;
	}else if(!document.all && (document.layers || document.getElementById)){
		returnVal = window.innerHeight;
	}
	//return returnVal-1;
	return returnVal;
}

//----------------------------------------------------------------------------------------------------------------------------------------------------------------//
//		set Replace / Resize
//----------------------------------------------------------------------------------------------------------------------------------------------------------------//
waterShinyBPObject.replaceResize = function(){
	var mainContainer = document.getElementById("waterShinyBP_main");
	if(mainContainer && !this.bNotResize){	
		mainContainer.style.top = this.getScrollY()+"px";
		mainContainer.style.left = this.getScrollX()+"px";
		mainContainer.style.width = this.getWidth()+"px";
		mainContainer.style.height = this.getHeight()+"px";
	}
}
	//	-----------------------------------------------------------------------------------------------------------------------------------------------------------//
	//		WINDOW EVENTS
	//	-----------------------------------------------------------------------------------------------------------------------------------------------------------//
		if (window.addEventListener) window.addEventListener("resize",waterShinyBPResize,false);
		if (window.attachEvent) window.attachEvent("onresize",waterShinyBPResize); 
		if (window.addEventListener) window.addEventListener("scroll",waterShinyBPResize,false);
		if (window.attachEvent) window.attachEvent("onscroll",waterShinyBPResize); 
	//	-----------------------------------------------------------------------------------------------------------------------------------------------------------//
	//		START
	//	-----------------------------------------------------------------------------------------------------------------------------------------------------------//
	waterShinyBPObject.attachBlogParts();
}

function waterShinyBPResize(){
	waterShinyBPObject.replaceResize();
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
//		F2JS	
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
function waterShinyBPOpenMain(_pinkyID){
	waterShinyBPObject.pinkyID = _pinkyID;
	waterShinyBPObject.orginalOverHidden = waterShinyBPObject.body.style.overflow;
	waterShinyBPObject.body.style.overflow = "hidden";
	waterShinyBPObject.hideOther();
	waterShinyBPObject.attachMain();
	//document.getElementById("waterShinyBP_float").style.visibility='hidden';	
}

function waterShinyBPCloseMain(){
	if(waterShinyBPObject.bIE){
		waterShinyBPObject.removeMain();
	}else{
		waterShinyBPObject.removeMain();
	}
	waterShinyBPObject.respawnOtherObject();
	waterShinyBPObject.body.style.overflow = waterShinyBPObject.orginalOverHidden;
	//document.getElementById("waterShinyBP_float").style.visibility='visible';
}
