var ie4=document.all;
var dom=document.getElementById;
var current='';
var current2='';

function hide(e,n){
if(ie4||dom){
obj=dom? document.getElementById(e) : document.all[e];
if(obj){
obj.style.backgroundColor='';
obj.style.borderWidth='0px';
obj.style.borderBottomWidth='1px';
}
subm='sm'+e.substr(1,3);
obj=dom? document.getElementById(subm) : document.all[subm];
if(obj&&n&&parseInt(n.substr(1,3))<parseInt(e.substr(1,3))) obj.style.display='none';
cont='c'+e.substr(1,3);
obj=dom? document.getElementById(cont) : document.all[cont];
if(obj) obj.style.display='none';
}
}

function show(e){
if(current==e) return;
if(ie4||dom){
if(current2!='') hide(current2);
current2='';
if(current!='') hide(current,e);
current=e;
obj=dom? document.getElementById(e) : document.all[e];
if(obj){
obj.style.backgroundColor='#EEEFFF';
obj.style.borderWidth='1px';
}
subm='sm'+e.substr(1,3);
obj=dom? document.getElementById(subm) : document.all[subm];
if(obj) obj.style.display='block';
cont='c'+e.substr(1,3);
obj=dom? document.getElementById(cont) : document.all[cont];
if(obj) obj.style.display='block';
}
}
		
function show2(e){
if(current2==e) return;
if(ie4||dom){
p=e.substr(0,3);
if(current!=p) show(p);
else if(current2!='') hide(current2);
current2=e;
obj=dom? document.getElementById(e) : document.all[e];
if(obj){
obj.style.backgroundColor='#F0FFFF';
obj.style.borderWidth='1px';
}
subm='sm'+e.substr(1,3);
obj=dom? document.getElementById(subm) : document.all[subm];
if(obj) obj.style.display='block';
cont='c'+e.substr(1,2);
obj=dom? document.getElementById(cont) : document.all[cont];
if(obj) obj.style.display='none';
cont='c'+e.substr(1,3);
obj=dom? document.getElementById(cont) : document.all[cont];
if(obj) obj.style.display='block';
}
}

function checkdom(){
if(ie4||dom) return false;
return true;
}
