var ie4=document.all
var ns6=document.getElementById && !document.all
//----------------------------------------------
function resize(){
    if (ie4||ns6){
    var resizeobj=ie4? document.all["div0"] : document.getElementById("div0")
    var scrwidth=ie4? document.body.clientWidth : window.innerWidth
    document.cookie = "wWidth=" + scrwidth + ";"
    if (resizeobj && scrwidth>1000){
    resizeobj.style.marginLeft=(scrwidth - 1000)/2 + "px"
   }else if(resizeobj && scrwidth<=1000) {
    resizeobj.style.marginLeft="0px"
    }
}
}

function getmargin(){
    if (ie4||ns6){
    var resizeobj=ie4? document.all["div0"] : document.getElementById("div0")
    var scrwidth=ie4? document.body.clientWidth : window.innerWidth


 resizeobj.style.marginLeft=(scrwidth - 1000)/2 + "px"

}
}

function show_sbox(what, i){
    if (ie4||ns6){
            curboxId='s_box' + parseInt(i)
        var nextboxId = 's_box' + (what=="next" ? parseInt(i) + 1 : parseInt(i) - 1);
        var nextbox=ie4? document.all[nextboxId] : document.getElementById(nextboxId)
        var curbox=ie4? document.all[curboxId] : document.getElementById(curboxId)
        nextbox.style.display= "block";
        curbox.style.display= "none";

       // nextbox.style.background=(i==trangso) ? "#C6E2FF" : "#ffffff";
    }
}

