function tableCssInit(){
var trGroup=document.getElementsByTagName("TR");
var startTRIndex=0;
if(trGroup[0].className=="caption"){
startTRIndex=1;
}
for(var i=startTRIndex;i<trGroup.length;i++)
{
if(i%2==0)
trGroup[i].style.backgroundColor="#efefef";
else
trGroup[i].style.backgroundColor="#ffffff";
}
}
function changerColor(curTR){
var trGroup=document.getElementsByTagName("TR");
var startTRIndex=0;
if(trGroup[0].className=="caption"){
startTRIndex=1;
}
for(var i=startTRIndex;i<trGroup.length;i++)
{
//注意,顏色在匹配的時候一定要用小寫
if(trGroup[i].style.backgroundColor!="#ff9966")
{
if(i%2==0)
trGroup[i].style.backgroundColor="#efefef";
else
trGroup[i].style.backgroundColor="#ffffff";
}
}
if(curTR.style.backgroundColor!="#ff9966")
curTR.style.backgroundColor="yellow";
}
function chooseItem(curTR){
var trGroup=document.getElementsByTagName("TR");
var startTRIndex=0;
if(trGroup[0].className=="caption"){
startTRIndex=1;
}
for(var i=startTRIndex;i<trGroup.length;i++)
{
if(i%2==0)
trGroup[i].style.backgroundColor="#efefef";
else
trGroup[i].style.backgroundColor="#ffffff";
}
curTR.style.backgroundColor="#ff9966";
if(curTR.firstChild.firstChild.checked!=null){
curTR.firstChild.firstChild.click();
}
}
function changeColorBack(curTR){
var trGroup=document.getElementsByTagName("TR");
var startTRIndex=0;
if(trGroup[0].className=="caption"){
startTRIndex=1;
}
for(var i=startTRIndex;i<trGroup.length;i++)
{
if(trGroup[i].style.backgroundColor!="#ff9966")
{
if(i%2==0)
trGroup[i].style.backgroundColor="#efefef";
else
trGroup[i].style.backgroundColor="#ffffff";
}
}
}
function changeTitleColor(myTD){
myTD.style.backgroundColor="orange";
myTD.style.color="black";
}
function changeTitleColorBack(myTD){
myTD.style.backgroundColor="#000066";
myTD.style.color="white";
}