﻿var line = new Array()
line[1] = "手机找工作?上3g.u88job.com"
line[2] = "随时随地刷新简历，轻松求职!"
line[3] = "手机随时随地快速查看面试通知!"

//设置字体大小
var ts_fontsize = "16px"

//--Don't edit below this line

var longestmessage = 1
for (i = 2; i < line.length; i++) {
    if (line[i].length > line[longestmessage].length)
        longestmessage = i
}

//Auto set scroller width
var tscroller_width = line[longestmessage].length

lines = line.length - 1 //--Number of lines


temp = ""
nextchar = -1;
nextline = 1;
cursor = "\\"
function animate() {
    if (temp == line[nextline] & temp.length == line[nextline].length & nextline != lines) {
        nextline++;
        nextchar = -1;
        wapMtxt.innerHTML = temp;
        temp = "";
        setTimeout("nextstep()", 3000)
    }
    else if (nextline == lines & temp == line[nextline] & temp.length == line[nextline].length) {
        nextline = 1;
        nextchar = -1;
        wapMtxt.innerHTML = temp;
        temp = "";
        setTimeout("nextstep()", 3000)
    }
    else {
        nextstep()
    } 
}

function nextstep() {

    if (cursor == "\\") {
        cursor = "|"
    }
    else if (cursor == "|") {
        cursor = "/"
    }
    else if (cursor == "/") {
        cursor = "-"
    }
    else if (cursor == "-") {
        cursor = "\\"
    }


    nextchar++;
    temp += line[nextline].charAt(nextchar);
    wapMtxt.innerHTML = temp + cursor
    setTimeout("animate()", 100)
}

//if IE 4+ or NS6
if (document.all || document.getElementById)
    animate();

