﻿/**
* ver_ch.js
*
* @version	1.2.2.1
* @update	19:25 2008/03/21
*
*/

// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Set Up

var swfURI = './f/loader.swf';
var swfWid = '800';
var swfHei = '247';
var swfBgc = '#ffffff';
var swfId  = 'flash';
var swfTgt = 'mainImage';

var MM_contentVersion = 9;

var lowerPlugIn = '<img src="./img/catch.jpg" alt="人間味のある、暖かい家造りを目指します。" />';

// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: End of Set Up

var $id = function(eId) {
	if (document.getElementById(eId)) return document.getElementById(eId);
};

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="sameDomain" />';
    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 st = document.getElementById(swfTgt);
st.innerHTML = swf_obj;

