function changetab(tabnum) {

 var startnum = new Array(4)
 startnum[1] = 1;
 startnum[2] = 4;
 startnum[3] = 7;
   for (i=2;i<11;i++) {
    document.getElementById('toprow'+i).className = "vi_linelight_d";
		document.getElementById('bottomrow'+i).className = "vi_linedark_d";
	}
	for (i=1;i<4;i++) { 
	  document.getElementById('tab'+i).className = "vi_tab2_d";
		document.getElementById('innerdiv'+i).style.visibility = "hidden";
	}
  for (i=2;i<12;i++) { 
	  if (i != 3 && i != 6 && i != 9 ) { 
				
  	  if ((i % 2) == 0) {
  		 document.getElementById('line'+i).className = "vi_linelight_d";
  		} else {
  		  document.getElementById('line'+i).className = "vi_linedark_d";
  		}
		}
	}
 

 document.getElementById('toprow'+startnum[tabnum]).className = "vi_linedark_d";
 document.getElementById('toprow'+(startnum[tabnum]+1)).className = "vi_linelight_d";
 document.getElementById('toprow'+(startnum[tabnum]+2)).className = "vi_tab1_d";
 document.getElementById('toprow'+(startnum[tabnum]+3)).className = "vi_linelight_d";
 document.getElementById('toprow'+(startnum[tabnum]+4)).className = "vi_linedark_d";
 
 
 document.getElementById('line'+startnum[tabnum]).className = "vi_linedark_d";
 document.getElementById('line'+(startnum[tabnum]+1)).className = "vi_linelight_d";
 document.getElementById('tab'+tabnum).className = "vi_tab1_d";
 document.getElementById('line'+(startnum[tabnum]+3)).className = "vi_linelight_d";
 document.getElementById('line'+(startnum[tabnum]+4)).className = "vi_linedark_d";
 
 
 document.getElementById('bottomrow'+startnum[tabnum]).className = "vi_linedark_d";
 document.getElementById('bottomrow'+(startnum[tabnum]+1)).className = "vi_linelight_d";
 document.getElementById('bottomrow'+(startnum[tabnum]+2)).className = "vi_tab1_d";
 document.getElementById('bottomrow'+(startnum[tabnum]+3)).className = "vi_linelight_d";
 document.getElementById('bottomrow'+(startnum[tabnum]+4)).className = "vi_linedark_d";
 

 document.getElementById('innerdiv'+tabnum).style.visibility = "visible";
  if (document.getElementById&&!document.all){
	  document.getElementById('innerdiv'+tabnum).style.position = "absolute";
		document.getElementById('innerdiv'+tabnum).style.left = 0;
		document.getElementById('innerdiv'+tabnum).style.top = 0;
	}
}

function changetabgallery(tabnum,check) {
 var startnum_g = new Array(3)
 startnum_g[1] = 1;
 startnum_g[2] = 4;

 if (check==0)
 {
	 j=6;k=2;l=7;
 }
 else
 {
     j=8;k=3;l=9;
 }

  for (i=2;i<j;i++) {
    document.getElementById('toprow_g'+i).className = "vi_linelight_d";
		document.getElementById('bottomrow_g'+i).className = "vi_linedark_d";
	}
	for (i=1;i<k;i++) { 
	  document.getElementById('tab_g'+i).className = "vi_tab2_d";
	  document.getElementById('innerdiv_g'+i).style.visibility = "hidden";
	}
  for (i=2;i<l;i++) { 
	  if (i != 3 && i != 6) { 
				
  	  if ((i % 2) == 0) {
  		  document.getElementById('line_g'+i).className = "vi_linelight_d";
  		} else {
  		  document.getElementById('line_g'+i).className = "vi_linedark_d";
  		}
		}
	}
 

 document.getElementById('toprow_g'+startnum_g[tabnum]).className = "vi_linedark_d";
 document.getElementById('toprow_g'+(startnum_g[tabnum]+1)).className = "vi_linelight_d";
 document.getElementById('toprow_g'+(startnum_g[tabnum]+2)).className = "vi_tab1_d";
 document.getElementById('toprow_g'+(startnum_g[tabnum]+3)).className = "vi_linelight_d";
 document.getElementById('toprow_g'+(startnum_g[tabnum]+4)).className = "vi_linedark_d";
 

 document.getElementById('line_g'+startnum_g[tabnum]).className = "vi_linedark_d";
 document.getElementById('line_g'+(startnum_g[tabnum]+1)).className = "vi_linelight_d";
 document.getElementById('tab_g'+tabnum).className = "vi_tab1_d";
 document.getElementById('line_g'+(startnum_g[tabnum]+3)).className = "vi_linelight_d";
 document.getElementById('line_g'+(startnum_g[tabnum]+4)).className = "vi_linedark_d";
 
 
 document.getElementById('bottomrow_g'+startnum_g[tabnum]).className = "vi_linedark_d";
 document.getElementById('bottomrow_g'+(startnum_g[tabnum]+1)).className = "vi_linelight_d";
 document.getElementById('bottomrow_g'+(startnum_g[tabnum]+2)).className = "vi_tab1_d";
 document.getElementById('bottomrow_g'+(startnum_g[tabnum]+3)).className = "vi_linelight_d";
 document.getElementById('bottomrow_g'+(startnum_g[tabnum]+4)).className = "vi_linedark_d";
 
 if (check==1)
 { document.getElementById('toprow_g8').className = "vi_linelight_d";}

 
 document.getElementById('innerdiv_g'+tabnum).style.visibility = "visible";
  if (document.getElementById&&!document.all){
	  document.getElementById('innerdiv_g'+tabnum).style.position = "absolute";
		document.getElementById('innerdiv_g'+tabnum).style.left = 0;
		document.getElementById('innerdiv_g'+tabnum).style.top = 0;
	}
}

function changetabform(tabnumf) {
 var startnum_f = new Array(5)
 startnum_f[1] = 1;
 startnum_f[2] = 4;
 startnum_f[3] = 7;
 startnum_f[4] = 10;
 


 var tabbkcol= "vi_tab_f1";
 
 	var x = document.getElementById('d1');
	if (x.currentStyle) {
		var y = x.currentStyle['color'];
	} else {
		var y =  document.defaultView.getComputedStyle(x,null).getPropertyValue('color');
	}
    switch (y)
    {
     case '#fff':
      tabbkcol="vi_tab_f1 vi_tab_f1_w";
      break
     case '#ffffff':
      tabbkcol="vi_tab_f1 vi_tab_f1_w";
      break
    case "rgb(255, 255, 255)":
     tabbkcol="vi_tab_f1 vi_tab_f1_w";
     break
	case '#efefef':
      tabbkcol="vi_tab_f1 vi_tab_f1_w";
      break
    case "rgb(239, 239, 239)":
     tabbkcol="vi_tab_f1 vi_tab_f1_w";
     break
   default:
    tabbkcol= "vi_tab_f1";
 }

 var tabbkcol2= "vi_tab2_d";
   var bx = document.getElementById('d3');
	if (x.currentStyle) {
		var by = bx.currentStyle['backgroundColor'];
	} else {
		var by =  document.defaultView.getComputedStyle(bx,null).getPropertyValue('background-Color');
	}
	
    switch (by)
    {
     case '#999':
   tabbkcol2="vi_tab2_d_N";
      break
     case '#999999':
      tabbkcol2="vi_tab2_d_N";
      break
    case "rgb(153, 153, 153)":
     tabbkcol2="vi_tab2_d_N";
     break
   default:
   tabbkcol2="vi_tab2_d";
 }

  for (i=2;i<14;i++) {
    document.getElementById('toprow_f'+i).className = "vi_linelight_d";
		document.getElementById('bottomrow_f'+i).className = "vi_linedark_d";
	}
	for (i=1;i<5;i++) {
	  document.getElementById('tab_f'+i).className = tabbkcol2;
	}
  for (i=2;i<14;i++) {
	  if (i != 3 && i != 6 && i != 9 && i != 12) {
				//alert(i)
  	  if ((i % 2) == 0) {
  		  document.getElementById('line_f'+i).className = "vi_linedark_d";
  		} else {
  		  document.getElementById('line_f'+i).className = "vi_linelight_d";
  		}
		}
	}
 
 
 document.getElementById('toprow_f'+startnum_f[tabnumf]).className = "vi_linelight_d";
 document.getElementById('toprow_f'+(startnum_f[tabnumf]+1)).className = "vi_linedark_d";
 document.getElementById('toprow_f'+(startnum_f[tabnumf]+2)).className = tabbkcol;
 document.getElementById('toprow_f'+(startnum_f[tabnumf]+3)).className = "vi_linedark_d";
 document.getElementById('toprow_f'+(startnum_f[tabnumf]+4)).className = "vi_linelight_d";
 
 
 document.getElementById('line_f'+startnum_f[tabnumf]).className = "vi_linelight_d";
document.getElementById('line_f'+(startnum_f[tabnumf]+1)).className = "vi_linedark_d";
 document.getElementById('tab_f'+tabnumf).className = tabbkcol;
 document.getElementById('line_f'+(startnum_f[tabnumf]+3)).className = "vi_linedark_d";
 document.getElementById('line_f'+(startnum_f[tabnumf]+4)).className = "vi_linelight_d";
 

 document.getElementById('bottomrow_f'+startnum_f[tabnumf]).className = "vi_linedark_d";
 document.getElementById('bottomrow_f'+(startnum_f[tabnumf]+1)).className = "vi_linedark_d";
 document.getElementById('bottomrow_f'+(startnum_f[tabnumf]+2)).className = "vi_tab_f1";
document.getElementById('bottomrow_f'+(startnum_f[tabnumf]+3)).className = "vi_linedark_d";
 document.getElementById('bottomrow_f'+(startnum_f[tabnumf]+4)).className = "vi_linedark_d";
 

document.getElementById('toprow_f14').className = "vi_linelight_d";
 document.getElementById('bottomrow_f14').className = "vi_linedark_d";
 document.getElementById('line_f14').className = "vi_linedark_d";
if (tabnumf==1)
{
document.getElementById('line_f2').className = "vi_tab_f1";
document.getElementById('bottomrow_f2').className = "vi_tab_f1";
}



 document.getElementById('innerdiv_f').style.visibility = "visible";
  if (document.getElementById&&!document.all){
	  document.getElementById('innerdiv_f').style.position = "absolute";
		document.getElementById('innerdiv_f').style.left = 0;
		document.getElementById('innerdiv_f').style.top = 0;
	}


}

