﻿var zzr_index = 0;
var zzr_step = 89;
var zzr_max = -2;

function zzr_move()//direction为真则上移，否则下移
{
    if(!arguments[0])
    {
        if(zzr_index > zzr_max)
        {
            zzr_index--;
        }
        else
        {
            zzr_index = 0;
        }
    }
    else
    {
        if(zzr_index < 0)
        {
            zzr_index++;
        }
        else
        {
            zzr_index = zzr_max;
        }
    }
    document.getElementById("zxr").style.marginTop = (zzr_index * zzr_step) + "px";
    return false;
}

var al_index = 0;
var al_step = 222;
var al_max = -5;

function al_move()//direction为真则上移，否则下移
{
    if(!arguments[0])
    {
        if(al_index > al_max)
        {
            al_index--;
        }
        else
        {
            al_index = 0;
        }
    }
    else
    {
        if(al_index < 0)
        {
            al_index++;
        }
        else
        {
            al_index = al_max;
        }
    }
    document.getElementById("case").style.marginTop = (al_index * al_step) + "px";
    return false;
}


var kehu_position = 0;
function kehu_move()
{
    if(kehu_position==-1022) 
    {
        kehu_position = 0;
    }
    else
    {    
        kehu_position -= 1;
    }
    document.getElementById("kehu_self").style.marginLeft = kehu_position + "px";
}
