help for javascript,cs and html

help for javascript,cs and html

am 08.01.2008 22:37:17 von Brian

problems :
Menu is always flash when the mouse move over.and when expand one
menu,other menus positons is moved.I don't want to move the menus
positons when expanding some menu.

Thanks

my codes includes 3 files as the following:

<>


TR/xhtml11/DTD/xhtml11.dtd">







MetaData










































<>

var last_expanded = '';

function showHide(id)
{
var obj = document.getElementById(id);

var status = obj.className;

if (status == 'hide') {

if (last_expanded != '') {
var last_obj = document.getElementById(last_expanded);
last_obj.className = 'hide';
}

obj.className = 'show';

last_expanded = id;
} else {
obj.className = 'hide';
}
}


}


<>

..submenu{
/*background-image: url(../images/white.jpg);*/
display: block;
height: 19px;
width:100px;
margin-left: 38px;
padding-top: 2px;
padding-left: 7px;
color: #333333;
}
..submenu:hover{
background-color: #5A8EC6;
}

..leftmenu{
/*background-image: url(../images/white.jpg);*/
display: block;
height: 19px;
margin-left: 38px;
width:100px;
padding-top: 2px;
padding-left: 7px;
color: #333333;
}
..leftmenu:hover{
/*background-image: url(../images/white.jpg);*/
background-color: #FFFFFF;
}
..hide{
display: none;
}
..show{
display: block;
}