var lastDivId;
function showContentDiv(cid)
{
var objcurr=document.getElementById(cid);
var objlast=document.getElementById(lastDivId);
if(objlast!=null)
{
///当前选项等于上次选项时
if(objlast==objcurr&&objlast.style.display=="block")
{
objlast.style.display="none";
}else if(objlast==objcurr&&objlast.style.display=="none")
{
//objcurr.style.display="block";
objlast.style.display="block";
}
///当前选项不等于上次选项时
if(objlast!=objcurr)
{
objlast.style.display="none";
objcurr.style.display="block";
}
//objcurr.style.display="block";
}else{objcurr.style.display="block";}
lastDivId=cid;
//document.getElementById(lastDivId).style.display=="block";
}
</script>
var lastDivId; function showContentDiv(cid) { var objcurr=document.getElementById(cid); var objlast=document.getElementById(lastDivId); if(objlast!=null) { ///当前选项等于上次选项时 if(objlast==objcurr&&objlast.style.display=="block") { objlast.style.display="none"; }else if(objlast==objcurr&&objlast.style.display=="none") { //objcurr.style.display="block"; objlast.style.display="block"; } ///当前选项不等于上次选项时 if(objlast!=objcurr) { objlast.style.display="none"; objcurr.style.display="block"; } //objcurr.style.display="block"; }else{objcurr.style.display="block";} lastDivId=cid; //document.getElementById(lastDivId).style.display=="block"; } </script>