// JavaScript Document

//-----------------------------hukunquan-----------------------------

//ÈÃ±³¾°½¥½¥±ä°µ
var isIe = (document.all) ? true : false;
function showBackground(obj, endInt) {
    if (isIe) {
       
        obj.filters.alpha.opacity += 1;
        if (obj.filters.alpha.opacity < endInt) {
            setTimeout(function () { showBackground(obj, endInt) }, 5);
        }
    } else {
        var al = parseFloat(obj.style.opacity); al += 0.01;
        obj.style.opacity = al;
        if (al < (endInt / 100))
        { setTimeout(function () { showBackground(obj, endInt) }, 5); }
    }
}
function tabsclass(obj, id, ids) {
    obj.className = "selectTag";
    for (var i = 0; i <= ids; i++) {
        if (i != id)
            document.getElementById("zxclass" + i).className = "";
    }
    if (id != 0) {
        document.getElementsByName("ctl00$ContentPlaceHolder1$Index_Question1$ddlquestype").value = id;
        //document.getElementById("ctl00_ContentPlaceHolder1_Index_Question1_ddlquestype").disabled = true;
    }
    else {
        document.getElementsByName("ctl00$ContentPlaceHolder1$Index_Question1$ddlquestype").value = -1;
        //document.getElementById("ctl00_ContentPlaceHolder1_Index_Question1_ddlquestype").disabled = false;
    }

}

//-----------------------------hukunquan-----------------------------



function getElementsByClassName(className, node) {

    if (node == null) {
        var all = document.all ? document.all : document.getElementsByTagName('*');
    } else {

        var all = node.getElementsByTagName('*');

    }
    var elements = new Array();

    for (var e = 0; e < all.length; e++) {

        if (all[e].className == className) {

            elements[elements.length] = all[e];

            break;
        }
    }

    return elements;
}


function close_Yuhelp(str) {
    var bass = document.getElementById(str);
    bass.style.display = "none";
}
function closebasstop(num) {
    /*if(int_show == num){
    if(int_show == 0){int_show=1;} else{ int_show=0;}
    var bass=document.getElementById("close_basstop");
    toggle(bass);
    }*/

    var obj = document.getElementById("bass_top");
    var obj2 = document.getElementById("bass_topabs");
    if (isIe) { obj2.style.marginLeft = -477 + "px" }

    /*	var lt=(document.body.clientWidth - obj2.offsetWidth)/2 ;
    obj2.style.left = lt+"px";
				
    alert(obj2.style.left);
    */
    if (num == 1) {


        if (obj.style.height < 1) {

            obj.style.display = "block";
            showHeight(obj, obj2, 61, 1);
        }
    }
    else {
        noneHeight(obj, obj2, 62, 62);


    }
}
/*----------cha-----------*/
function showHeight(obj, obj2, endInt, height) {
    obj2.style.top = (height - endInt) + "px";
    obj.style.height = height + "px";
    if (height < endInt) {
        height += 2
        setTimeout(function () { showHeight(obj, obj2, endInt, height) }, 5);
    }
}

function noneHeight(obj, obj2, endInt, height) {
    obj2.style.top = (height - endInt) + "px";
    obj.style.height = height + "px";
    if (height > 0) {
        height = height - 2;

        setTimeout(function () { noneHeight(obj, obj2, endInt, height) }, 5);
    } else {
        obj2.style.top = (0 - 61) + "px";
        document.getElementById("bass_top").style.display = "none";
        document.getElementById("bass_top").style.height = 0 + "px";
        document.getElementById("bass_top").style.height = "";
    }
}
/*----------/cha-----------*/
function memail(obj) {
    var sreach1 = document.getElementById("bass_sreach");
    var sreach2 = document.getElementById("bass_sreach2");
    obj.className = "bass_emaildyc";
    var bass = document.getElementById("mobiledy");
    bass.className = "bass_mobiledyc";
    sreach1.style.display = "none";
    sreach2.style.display = "block";

}
function mmob(obj) {
    var sreach1 = document.getElementById("bass_sreach");
    var sreach2 = document.getElementById("bass_sreach2");
    obj.className = "bass_mobiledy";
    var bass = document.getElementById("emaildy");
    bass.className = "bass_emaildy";
    sreach2.style.display = "none";
    sreach1.style.display = "block";
}
function changetab(obj) {

    var obj1 = document.getElementById("bass_zx");
    var obj2 = document.getElementById("bass_ly");
    obj1.className = "yu_nav02_dh02"
    obj2.className = "yu_nav02_dh02"
    obj.className = "yu_nav02_dh01"
    obj1 = document.getElementById("bass_zxs");
    obj2 = document.getElementById("bass_lys");
    obj1.style.display = "none";
    obj2.style.display = "none";
    var str = obj.id;
    str += "s";
    document.getElementById(str).style.display = "table";
}
function tabs2change(obj, id, ids, ids2) {
    var tab = document.getElementById(id);
    var tabs = document.getElementById(ids);
    var tabs2 = document.getElementById(ids2);
    var arr = new Array();
    var arr2 = new Array();
    arr = getElementsByClassName("thising", tabs);
    arr2 = getElementsByClassName("value", tabs2);
    arr[0].className = "nothis";
    arr2[0].className = "none";
    /*var arr=tabs.getElementByTagName("LI");
    arr[0].className="nothis";
    arr[1].className="nothis";
    arr[2].className="nothis";*/
    obj.className = "thising";
    tab.className = "value";
}
function tabschange(obj) {
    var tabs = document.getElementById("pd_win");

    var arr = new Array();
    var arr2 = new Array();
    arr = getElementsByClassName("thising");
    arr2 = getElementsByClassName("value", tabs);
    arr[0].className = "nothis";

    /*var arr=tabs.getElementByTagName("LI");
    arr[0].className="nothis";
    arr[1].className="nothis";
    arr[2].className="nothis";*/
    obj.className = "thising";
    var strid = obj.id;
    strid += "2";


    arr2[0].className = "none";
    var planobj = document.getElementById(strid);
    planobj.className = "value";
}

/*ÅÜÂíµÆ*/
function ScrollImgLeft() {
    var speed = 20
    var scroll_begin = document.getElementById("scroll_begin");
    var scroll_end = document.getElementById("scroll_end");
    var scroll_div = document.getElementById("scroll_div");
    scroll_end.innerHTML = scroll_begin.innerHTML
    function Marquee() {
        if (scroll_end.offsetWidth - scroll_div.scrollLeft <= 0)
            scroll_div.scrollLeft -= scroll_begin.offsetWidth
        else
            scroll_div.scrollLeft++
    }
    var MyMar = setInterval(Marquee, speed)
    scroll_div.onmouseover = function () { clearInterval(MyMar) }
    scroll_div.onmouseout = function () { MyMar = setInterval(Marquee, speed) }
}
