﻿// JScript 文件

var postSpeed = 30;
var post = null;
var postTemp1 = null;
var postTemp2 = null;

function postFix()
{
    post = document.getElementById("tablet");
    postTemp1 = document.getElementById("divpostTemp1");
    postTemp2 = document.getElementById("divpostTemp2");
    
    if (post != null && postTemp1 != null && postTemp2 != null)
    {
        if (postTemp1.offsetHeight == 429)
        {
            postTemp2.innerHTML = postTemp1.innerHTML;
        }
        
        var MyPost = setInterval("postScroll()", postSpeed);
        post.onmouseover = function(){clearInterval(MyPost)};
        post.onmouseout = function(){MyPost = setInterval(postScroll, postSpeed)};
    }
}

function postScroll()
{
    if (postTemp2.offsetTop - post.scrollTop <= 0)
    {
        post.scrollTop -= postTemp1.offsetHeight;
    }
    else
    {
        post.scrollTop++;
    }
}