/**
* <p>Copyright: ©2011 zhaof</p>
* <p>Title: index</p> 
* <p>Description: index</p>
* @author zhusk
* @version 1.0 2011-12-15
*/ 


$(function() {
    $("#bg").load(function() {
        setTimeout("purpose(2)", 2000);
    });
});
document.ondragstart = noDragstart;
document.onselectstart = noSelect;
function noDragstart() {
    return false;
}

function noSelect() {
    return false;
}

function purpose(index) {
    var i = index;
    if (i > 8) return;
    $("#bg").fadeTo(1000, 0,
    function() {
        $("#bg").attr("src", "images/banner/ws_" + i + ".jpg");
        $("#bg").unbind().load(function() {
            $("#bg").fadeTo(1000, 1,
            function() {
                setTimeout("purpose(" + (i + 1) + ")", 2000);
            });
        });
    });
}
