// 文字サイズ変更
<!--
function changeCharaSize(size) {
	document.getElementById("main").style.fontSize = size + '%';
	document.getElementById("foot").style.fontSize = size + '%';
}
//-->


// ページアップ
<!--
var scrj = 1;
function softScrollBack() {
   if(navigator.appName == "Microsoft Internet Explorer" && document.compatMode == "CSS1Compat") {
      var scdist = document.body.parentNode.scrollTop;
   } else {
      var scdist = document.body.scrollTop;
   }
   if(scrj<50 && scdist) {
      scdist = (scdist>2) ? Math.ceil(scdist*.2) : 1;
      scrj++;
      scrollBy(0,-scdist);
      setTimeout("softScrollBack()",20);
   } else {
      scrollTo(0,0);
      scrj = 1;
   }
}
// -->





// サブウィンドウ指定：MMT-X試験力範囲
<!--
function winType1()
{
 subwin1 = window.open("http://www.matsuzawa-ht.com/estimate/mmt/range_a.htm","1","scrollbars=0,resizable=0,left=450,top=220,width=370,height=40");
}
<!--

<!--
function winType2()
{
 subwin1 = window.open("http://www.matsuzawa-ht.com/estimate/mmt/range_b.htm","2","scrollbars=0,resizable=0,left=400,top=220,width=500,height=40");
}
<!--

// サブウィンドウ指定：VMT-X試験力範囲
<!--
function winType3()
{
 subwin1 = window.open("http://www.matsuzawa-ht.com/estimate/vmt/range_7.htm","3","scrollbars=0,resizable=0,left=450,top=220,width=270,height=40");
}
<!--

<!--
function winType4()
{
 subwin1 = window.open("http://www.matsuzawa-ht.com/estimate/vmt/range_7s.htm","4","scrollbars=0,resizable=0,left=450,top=220,width=270,height=40");
}
<!--

// サブウィンドウ指定：RMT-X試験力範囲
<!--
function winType5()
{
 subwin1 = window.open("http://www.matsuzawa-ht.com/estimate/rmt/range_1n.htm","5","scrollbars=0,resizable=0,left=450,top=220,width=50,height=40");
}
<!--

<!--
function winType6()
{
 subwin1 = window.open("http://www.matsuzawa-ht.com/estimate/rmt/range_1t.htm","6","scrollbars=0,resizable=0,left=400,top=220,width=160,height=40");
}
<!--

<!--
function winType7()
{
 subwin1 = window.open("http://www.matsuzawa-ht.com/estimate/rmt/range_3n.htm","7","scrollbars=0,resizable=0,left=450,top=220,width=110,height=40");
}
<!--

<!--
function winType8()
{
 subwin1 = window.open("http://www.matsuzawa-ht.com/estimate/rmt/range_3t.htm","8","scrollbars=0,resizable=0,left=400,top=220,width=310,height=40");
}
<!--








// サブウィンドウ指定：マイクロビッカース試料
<!--
function winType10()
{
 subwin1 = window.open("m_vick_shiryo.htm","10","scrollbars=0,resizable=0,left=450,top=220,width=600,height=300");
}
<!--

// サブウィンドウ指定：ビッカース試料
<!--
function winType11()
{
 subwin1 = window.open("d_vick_shiryo.htm","11","scrollbars=0,resizable=0,left=450,top=220,width=600,height=270");
}
<!--









// 画像入れ替え
<!--
function SwapImg(name,url)
{
document.images[name].src=url;
}
// -->






// JavaScript Document

var eventTimer;    // タイマー変数
var restScroll=0;    // スクロール残量

function Scroll(base,move){
    // 移動元(base)要素＆オブジェクトを取得
    var obj_base = getElemPosition(base);
    // 移動先(move)要素＆オブジェクトを取得
    var elem_move = document.getElementById(move);
    var obj_move = getElemPosition(elem_move);
    restScroll = obj_move.y-obj_base.y;
    eventTimer = setInterval(setScrollPosition,10);
}

// スクロール処理をする
function setScrollPosition() {
    var moveValue=0;
    // スクロール残量が80以上の場合、スクロール量を変える
    // Math.abs()では値の絶対値を取得
    if(Math.abs(restScroll)>80){
        moveValue = (restScroll>0)?20:-20;
    }else{
        moveValue = Math.round(restScroll/4);
    }
    // スクロールを処理
    parent.scrollBy(0,moveValue);
    // スクロール残量を計算して、残りが無ければタイマー解除
    restScroll = (restScroll>0)?restScroll-moveValue:restScroll-moveValue;
    if(moveValue==0){
        clearInterval(eventTimer);
        restScroll=0;
    }
}

// 要素の位置を取得し、オブジェクトとして返す
function getElemPosition(elem) {
    var obj = new Object();
    obj.x = elem.offsetLeft;
    obj.y = elem.offsetTop;
    // 親要素を取得して位置情報を修正する
    while(elem.offsetParent) {
        elem = elem.offsetParent;
        obj.x += elem.offsetLeft;
        obj.y += elem.offsetTop;
    }
    return obj;
}




<!--
var domain = "http://9851.pr.arena.ne.jp/embed.php";
var width = "560";
var height = "350";
var url = decodeURIComponent(window.location.search);
url = url.replace("?url=", "").replace(/&/ig, "&amp;");

var embedCode = '<p><object data="' + domain + "/" + url + '" width="' + width + '" height="' + height + '" type="text/html"><a href="../../../item/index.htm""' + url + '">拡大地図を表示</a></object></p>';
document.getElementById('snippetarea').value = embedCode;
// -->


