﻿var i = 70;
var v = 0;
var picLength;
$(document).ready(function() {
    //$("#rol_Ctn").css("position", "relative");
    picLength = $(".rol_ctn").children(".imgBox").length * 150 * 2;
    $("#rol_Ctn").css("margin-top", i);
    $(".rol_ctn").css("width", picLength);
    window.setInterval("rol_Ctn_Move()", 50);
    //alert(picLength);
    window.setInterval("rol_Ctn_Move2()", 50);
});
function rol_Ctn_Move() {
    $("#rol_Ctn").css("margin-top", i);
    if (i > -230) {
        i--;
    }
    else {
        i = 70;
    }
    $("#j").html(i);
}
function rol_Ctn_Move2() {
    $(".rol_active").css("margin-left", v);
    if (v > -150) {
        v-=2;
    }
    else {
        var c = $(".rol_active").html();
        var nxt = $(".rol_active").next();
        $(".rol_active").remove();
        $(".rol_ctn").append("<div class='imgBox bdr_FFF'>" + c + "</div>");
       nxt.attr("class", "imgBox bdr_FFF rol_active");
       
        
        v = 0;
    }
}
function CheckOrder() {
    var prefix="ctl00_ContentPlaceHolder1_";
    if ($("#" + prefix + "txtUnitName").val().trim() == "") {
        alert("单位名称不能为空!");
        return false;
    }
    if ($("#" + prefix + "txtAddr").val().trim() == "") {
        alert("通讯地址不能为空!");
        return false;
    }
    if ($("#" + prefix + "txtName").val().trim() == "") {
        alert("联系人不能为空!");
        return false;
    }
    if ($("#" + prefix + "txtPhone").val().trim() == "") {
        alert("联系电话不能为空!");
        return false;
    }
    if ($("#" + prefix + "txtMobilePhone").val().trim() == "") {
        alert("请填写您的手机号码!");
        return false;
    }
    if ($("#" + prefix + "txtPeopleCount").val().trim() == "" || isNaN($("#" + prefix + "txtPeopleCount").val().trim ())) {
        alert("培训人数不能为空!");
        return false;
    }
    return true;
}
