Forum Moderators: open
function change(id, newClass)
{
if (document.getElementById(id)) {document.getElementById(id).className=newClass;}
else if (id) {id.className=newClass;}
else {alert('Error: the id \''+id+'\' was not found or has not yet been imported to the DOM.\n\nNew class intended: '+newClass);}
}
function dhtml_sidebar(a,b,o)
{
change('sidetogglehide','hidden');
change('sidetoggleshow','hidden');
var c = document.getElementById('content');
var s = document.getElementById('side');
if (typeof dhtml.a=='undefined')
{
dhtml.a = 0;
dhtml.c = c.clientWidth;
dhtml.s = s.clientWidth;
dhtml.w = dhtml.c+dhtml.s;
}
if (o==undefined)
{
if (a=='hide')
{
if (s.style.opacity!=undefined) {o = 1.0;}
else {o = 100;}
}
else if (a=='show')
{
if (s.style.opacity!=undefined) {o = 0.0;}
else {o = 0;}
}
}
if (dhtml.a==0 && typeof b=='undefined' || dhtml.a==1 && b==1)
{
dhtml.a=1;
if (typeof dhtml.side=='undefined') {dhtml.side = s.clientWidth;}
if (a=='hide')
{
if (s.clientWidth>0)
{
if (s.clientWidth-10>0)
{
if (o!=0.00)
{
if (s.style.opacity!=undefined)
{
o = o-.05;
var oo = o.toFixed(2);
s.style.opacity=oo;
}
else
{
oo = o-5;
s.style.filter='alpha(opacity='+oo+')';
s.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity='+oo+')';
}
}
else
{
oo = 0;
}
s.style.width = s.clientWidth-10+'px';
c.style.width = c.clientWidth+10+'px'
setTimeout(function() {dhtml_sidebar('hide',1,oo);},25);
}
else
{
c.style.width = c.clientWidth+s.clientWidth+'px';
s.style.width = '0px';
s.style.display='none';
change('sidetoggleshow','block');
dhtml.a = 0;
}
}
}
else if (a=='show')
{
if (s.clientWidth<=dhtml.side)
{
if (s.clientWidth+10<dhtml.s)
{
var t1 = s.clientWidth;
var t2 = dhtml.s/2;
var c1 = c.clientWidth - dhtml.c;
if (c1>t2) {s.style.display='block';}
if (t1>t2)
{
if (s.style.opacity!=undefined)
{
if (s.clientWidth!=dhtml.s)
{
if (typeof o!='number') {o = parseFloat(o);}
var o1 = o + .05;
var oo = o1.toFixed(2);
s.style.opacity=oo;
}
else {s.style.opacity=1.0;}
}
else
{
oo = o+5;
s.style.filter='alpha(opacity='+oo+')';
s.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity='+oo+')';
}
}
s.style.width = s.clientWidth+10+'px';
c.style.width = c.clientWidth-10+'px';
setTimeout(function() {dhtml_sidebar('show',1,oo);},25);
}
else
{
s.style.width = dhtml.s+'px';
c.style.width = dhtml.c+'px';
if (s.style.opacity) {s.style.opacity=1.0;}
else {s.style.filter='alpha(opacity=100)';}
change('sidetogglehide','block');
dhtml.a = 0;
}
}
}
}
}
Does anyone have any thoughts on how I can go about trouble shooting this?