|
|
var TabImgLabelClass={
|
|
|
currentNumber:0,
|
|
|
|
|
|
border1:"images/tab/tab_border_1.gif", //第一个tab被选中时,上侧边框
|
|
|
border2:"images/tab/tab_border_2.gif", //非最后一个tab被选中时,下侧边框
|
|
|
border3:"images/tab/tab_border_3.gif", //非第一个tab未被选中时,下侧或上侧边框
|
|
|
border4:"images/tab/tab_border_4.gif", //非第一个tab被选中时,上侧边框
|
|
|
border5:"images/tab/tab_border_5.gif", //最后一个tab未被选中时,下侧边框
|
|
|
border6:"images/tab/tab_border_6.gif", //最后一个tab被选中时,下侧边框
|
|
|
border7:"images/tab/tab_border_7.gif", //第一个tab未被选中时,上侧边框
|
|
|
labelSuffix:"images/tab/tab_label",
|
|
|
|
|
|
tabImgLabelClick:function(idNumber,pageUrl,targetObj){
|
|
|
if(idNumber==this.currentNumber)return;
|
|
|
|
|
|
var labelObjs=document.all.tabLabel;
|
|
|
var borderObjs=document.all.tabBorder;
|
|
|
if(idNumber==0){ //点击第一个
|
|
|
if(labelObjs.length==1||labelObjs.length==undefined){ //只有一个
|
|
|
|
|
|
}else{
|
|
|
for(i=0;i<borderObjs.length;i++){
|
|
|
if(i==0){
|
|
|
borderObjs[i].src=this.border1;
|
|
|
labelObjs[i].src=this.labelSuffix+"_"+(i+1)+"_3.gif";
|
|
|
}else if(i==1){
|
|
|
borderObjs[i].src=this.border2;
|
|
|
labelObjs[i].src=this.labelSuffix+"_"+(i+1)+"_1.gif";
|
|
|
}else if(i!=borderObjs.length-1){
|
|
|
borderObjs[i].src=this.border3;
|
|
|
labelObjs[i].src=this.labelSuffix+"_"+(i+1)+"_1.gif";
|
|
|
}else{
|
|
|
borderObjs[i].src=this.border5;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}else if(idNumber==labelObjs.length-1){ //点击最后一个
|
|
|
for(i=0;i<borderObjs.length;i++){
|
|
|
if(i==0){
|
|
|
borderObjs[i].src=this.border7;
|
|
|
labelObjs[i].src=this.labelSuffix+"_"+(i+1)+"_1.gif";
|
|
|
}else if(i==borderObjs.length-2){
|
|
|
borderObjs[i].src=this.border4;
|
|
|
labelObjs[i].src=this.labelSuffix+"_"+(i+1)+"_3.gif";
|
|
|
}else if(i==borderObjs.length-1){
|
|
|
borderObjs[i].src=this.border6;
|
|
|
}else{
|
|
|
borderObjs[i].src=this.border3;
|
|
|
labelObjs[i].src=this.labelSuffix+"_"+(i+1)+"_1.gif";
|
|
|
}
|
|
|
}
|
|
|
}else{ //点击中间
|
|
|
for(i=0;i<borderObjs.length;i++){
|
|
|
if(i==0){
|
|
|
borderObjs[i].src=this.border7;
|
|
|
labelObjs[i].src=this.labelSuffix+"_"+(i+1)+"_1.gif";
|
|
|
}else if(i<borderObjs.length-2){
|
|
|
if(idNumber==i){
|
|
|
borderObjs[i].src=this.border4;
|
|
|
labelObjs[i].src=this.labelSuffix+"_"+(i+1)+"_3.gif";
|
|
|
}else if((idNumber+1)==i){
|
|
|
borderObjs[i].src=this.border2;
|
|
|
labelObjs[i].src=this.labelSuffix+"_"+(i+1)+"_1.gif";
|
|
|
}else{
|
|
|
borderObjs[i].src=this.border3;
|
|
|
labelObjs[i].src=this.labelSuffix+"_"+(i+1)+"_1.gif";
|
|
|
}
|
|
|
}else if(i==borderObjs.length-2){
|
|
|
if((idNumber+1)==i){
|
|
|
borderObjs[i].src=this.border2;
|
|
|
}else{
|
|
|
borderObjs[i].src=this.border3;
|
|
|
}
|
|
|
labelObjs[i].src=this.labelSuffix+"_"+(i+1)+"_1.gif";
|
|
|
}else if(i==borderObjs.length-1){
|
|
|
borderObjs[i].src=this.border5;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
this.currentNumber=idNumber;
|
|
|
targetObj.action=pageUrl;
|
|
|
targetObj.submit();
|
|
|
}
|
|
|
}; |