﻿/**
* ver_ch.js
*
* @version	1.3.0.0
* @update	10:46 2008/09/26
*
*/

// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Set Up

var swfURI = './f/loader.swf';
var swfWid = '840';
var swfHei = '250';
var swfBgc = '#000000';
var swfId  = 'swf';
var swfTgt = 'flashContent';

var MM_contentVersion = 9;

var lowerPlugIn = '<img src="./img/catch.jpg" alt="美しく健康的な笑顔が自然とこぼれる。そんな生活を実現する、Nao歯科の矯正治療" />';

// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: End of Set Up


var swf_obj = '';

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

if ( plugin ) {
    var words = navigator.plugins["Shockwave Flash"].description.split(" ");
    for (var i = 0, w = words.length; i < w; ++i) {
        if (isNaN(parseInt(words[i]))) {
            continue;
        }
        var MM_PluginVersion = words[i]; 
    }
    var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
    document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
    document.write('on error resume next \n');
    document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
    document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
    swf_obj += '<div id="' + swfId + '">';
    swf_obj += '<object type="application/x-shockwave-flash" data="' + swfURI + '" width="' + swfWid + '" height="' + swfHei + '">';
    swf_obj += '<param name="movie" value="' + swfURI + '" />';
    swf_obj += '<param name="allowScriptAccess" value="always" />';
    swf_obj += '<param name="quality" value="best" />';
    swf_obj += '<param name="bgcolor" value="' + swfBgc + '" />';
    swf_obj += '<param name="scale" value="noScale" />';
    swf_obj += '<param name="salign" value="TL" />';
    swf_obj += '<param name="quality" value="high" />';
    swf_obj += '<param name="menu" value="false" />';
    swf_obj += '<param name="base" value="." />';
    //swf_obj += '<param name="wmode" value="transparent" />';
    swf_obj += '<param name="FlashVars" value="playerMode=embedded" />';
    swf_obj += '</object>';
    swf_obj += '</div>';
} else {
    swf_obj += lowerPlugIn;
}

var s = document.getElementById(swfTgt);
s.innerHTML = swf_obj;
