﻿var imgIndex = 2;var stopOrRun = 1;
function imgChange(index) {
    if (stopOrRun == 1) {
        if (imgIndex > index) {
            imgIndex = 1;
        }
        imgBoChange(imgIndex);
        imgIndex++;
    }
}
function userOver(sel) {
    imgBoChange(sel);
    imgIndex = sel;
    stopOrRun = 0;
}
function userOut(sel) {
    stopOrRun = 1;
}
function imgBoChange(index) {
    var roadList = $("#_hidContent").val().split(";;;");
    var detailList = roadList[index - 1].split("^^^");
    if (index == 1) {
        $("#_divImg1").css({
            "border": "solid 1px white"
        });
        $("#_divImg2").css({
            "border": "0"
        });
        $("#_divImg3").css({
            "border": "0"
        });
    }
    else if (index == 2) {
        $("#_divImg2").css({
            "border": "solid 1px white"
        });
        $("#_divImg1").css({
            "border": "0"
        });
        $("#_divImg3").css({
            "border": "0"
        });
    }
    else if (index == 3) {
        $("#_divImg3").css({
            "border": "solid 1px white"
        });
        $("#_divImg2").css({
            "border": "0"
        });
        $("#_divImg1").css({
            "border": "0"
        });
    }
    $("#_imgIndex").css({
        "background-image": "url('" + detailList[0] + "')"
    });
    $("#_imgIndex").attr("title", detailList[1]);
    $("#_divHtml").html(detailList[2]);
}
function setTransition() {
    if (document.all) {
        document.getElementById("_imgIndex").filters.revealTrans.Transition = 23; //Math.floor(Math.random()*23)
        document.getElementById("_imgIndex").filters.revealTrans.apply();
    }
}
function playTransition() {
    if (document.all) {
    document.getElementById("_imgIndex").filters.revealTrans.play(); 
    }
}
