
function toggle(targetid){
    if (document.getElementById){
        target=document.getElementById(targetid);
        target.style.display="block";
    }
}
function hidet(hideid){
    if (document.getElementById){
        target=document.getElementById(hideid);
        target.style.display="none";      
    }
}

function tabToggle(id,img) {
    if (document.getElementById) {
        var tab = document.getElementById(id);
        for (var i = 0; i < tab.rows.length; i++) {
            if (tab.rows[i].className == "chidden" || tab.rows[i].className == "cshow") {
                if (tab.rows[i].style.display == "block") {
                    tab.rows[i].style.display = "none";
                    document.getElementById(img).src = "/images/allicon.jpg";
                } else {
                    tab.rows[i].style.display = "block";
                    document.getElementById(img).src = "/images/someicon.jpg";
                }
            }
        }
    }
}

function scrollDoor(){
}
scrollDoor.prototype = {
sd : function(menus,divs,openClass,closeClass){
var _this = this;
if(menus.length != divs.length)
{
alert("菜单层数量和内容层数量不一样!");
return false;
}
for(var i = 0 ; i < menus.length ; i++)
{
_this.$(menus[i]).value = i;
_this.$(menus[i]).onmouseover = function(){
for(var j = 0 ; j < menus.length ; j++)
{
_this.$(menus[j]).className = closeClass;
_this.$(divs[j]).style.display = "none";
}
_this.$(menus[this.value]).className = openClass;
_this.$(divs[this.value]).style.display = "block";
}
}
},
$ : function(oid){
if(typeof(oid) == "string")
return document.getElementById(oid);
return oid;
}
}


