// a JavaScript Document

function tblRollOn(xRow)
		{
			 var rows=document.getElementById('distTable').getElementsByTagName("TR");
			 for (var j=0; j<rows.length; j++)  
			   {
				var cells=rows[j].getElementsByTagName("TD");
				if(j==11)
				 {
				 cells[0].style.color='#666666';
			     cells[0].style.backgroundColor='#dededf';
				 cells[1].style.color='#000000';
			     cells[1].style.backgroundColor='#ffffff';
				 cells[2].style.color='#666666';
			     cells[2].style.backgroundColor='#dededf';
				 cells[3].style.color='#000000';
			     cells[3].style.backgroundColor='#ffffff';
				 cells[4].style.color='#666666';
			     cells[4].style.backgroundColor='#dededf';
				 }
				if (j==xRow) 
					{
					  for (var i=5; i<cells.length; i++)  
						 {
						  var tdLen=cells.length;
						  if(cells[i])
							  {
							  cells[i].style.backgroundColor='#b3913f';
							 if (i>=5 && i<tdLen)
								  {
								  cells[i].style.color='#b3913f';
								  }
							if(i==5 || i==(tdLen-1))
								  {
								   cells[i].style.color='#ffffff';
								  }
								  
								  if(i==5 && j==11)
								  {
								   cells[i].style.color='#b3913f';
						           cells[i].style.backgroundColor='#ffffff';
								  }
							  } 
						 }  
					 }
					 if(xRow==11)
						 {
						 if(j==11)
						 {
						 cells[0].style.color='#666666';
			             cells[0].style.backgroundColor='#dededf';
						 cells[1].style.color='#000000';
			     		 cells[1].style.backgroundColor='#ffffff';
						 cells[2].style.color='#666666';
			             cells[2].style.backgroundColor='#dededf';
						 cells[3].style.color='#666666';
						 cells[3].style.backgroundColor='#dededf';
						 cells[4].style.color='#ffffff';
						 cells[4].style.backgroundColor='#b3913f';
						 }
						 
						 if(cells[4] && j==12)
						 {
						  cells[4].style.color='#b3913f';
						  cells[4].style.backgroundColor='#b3913f';
						 }
						 if(cells[3] && j==12)
						 {
						 cells[4].style.color='#ffffff';
						 cells[4].style.backgroundColor='#b3913f';
						 }
					}
					
					if(xRow==12)
						 {
						 if(j==11)
						 {
						 cells[0].style.color='#666666';
			             cells[0].style.backgroundColor='#dededf';
						 cells[1].style.color='#666666';
			     		 cells[1].style.backgroundColor='#dededf';
						 cells[2].style.color='#666666';
			             cells[2].style.backgroundColor='#dededf';
						 cells[3].style.color='#ffffff';
						 cells[3].style.backgroundColor='#b3913f';
						 cells[4].style.color='#b3913f';
						 cells[4].style.backgroundColor='#b3913f';
						 }
						 
						 if(cells[3] && (j==12 || j==13))
						 {
						  cells[3].style.color='#b3913f';
						  cells[3].style.backgroundColor='#b3913f';
						 }
						 if(cells[2] && j==13)
						 {
						 cells[3].style.color='#ffffff';
						 cells[3].style.backgroundColor='#b3913f';
						 }
					}
					
					if(xRow==13)
						 {
						 if(j==11)
						 {
						 cells[0].style.color='#666666';
			             cells[0].style.backgroundColor='#dededf';
						 cells[1].style.color='#666666';
			     		 cells[1].style.backgroundColor='#dededf';
						 cells[2].style.color='#ffffff';
			             cells[2].style.backgroundColor='#b3913f';
						 cells[3].style.color='#b3913f';
						 cells[3].style.backgroundColor='#b3913f';
						 cells[4].style.color='#b3913f';
						 cells[4].style.backgroundColor='#b3913f';
						 }
						 
						 if(cells[2] && (j==12 || j==13 || j==14))
						 {
						  cells[2].style.color='#b3913f';
						  cells[2].style.backgroundColor='#b3913f';
						 }
						 if(cells[1] && j==14)
						 {
						 cells[2].style.color='#ffffff';
						 cells[2].style.backgroundColor='#b3913f';
						 }
					}
					
					if(xRow==14)
						 {//alert("hi");
						 if(j==11)
						 {
						 cells[0].style.color='#666666';
			             cells[0].style.backgroundColor='#dededf';
						 cells[1].style.color='#ffffff';
			     		 cells[1].style.backgroundColor='#b3913f';
						 cells[2].style.color='#b3913f';
			             cells[2].style.backgroundColor='#b3913f';
						 cells[3].style.color='#b3913f';
						 cells[3].style.backgroundColor='#b3913f';
						 cells[4].style.color='#b3913f';
						 cells[4].style.backgroundColor='#b3913f';
						 
						 
						 }
						 
						 if(cells[1] && (j==12 || j==13 || j==14 || j==15))
						 {
						  cells[1].style.color='#b3913f';
						  cells[1].style.backgroundColor='#b3913f';
						 }
						 if(cells[0] && j==15)
						 {
						 cells[1].style.color='#ffffff';
						 cells[1].style.backgroundColor='#b3913f';
						 }
					}
					if(xRow==15)
						 {//alert("hi");
						 if(j==11)
						 {
						 cells[0].style.color='#ffffff';
			             cells[0].style.backgroundColor='#b3913f';
						 cells[1].style.color='#b3913f';
			     		 cells[1].style.backgroundColor='#b3913f';
						 cells[2].style.color='#b3913f';
			             cells[2].style.backgroundColor='#b3913f';
						 cells[3].style.color='#b3913f';
						 cells[3].style.backgroundColor='#b3913f';
						 cells[4].style.color='#b3913f';
						 cells[4].style.backgroundColor='#b3913f';
						 
						 
						 }
						 
						 if(cells[0] && (j==12 || j==13 || j==14 || j==15))
						 {
						  cells[0].style.color='#b3913f';
						  cells[0].style.backgroundColor='#b3913f';
						 }
						 if(cells[0] && j==16)
						 {
						 cells[0].style.color='#ffffff';
						 cells[0].style.backgroundColor='#b3913f';
						 }
					}
				
				if(j<xRow)
				 {
				 	if(cells[5])
						 {
						  cells[5].style.color='#000000';
						  cells[5].style.backgroundColor='#ffffff';
						 }
	             }
				if(j!==xRow && j>xRow)
				 {
				 	if(cells[5])
						 {
						  cells[5].style.color='#b3913f';
						 }
	             }
				 if(j==11)
				   {
				 	if(cells[5])
						 {
				 		 cells[5].style.color='#b3913f';
						 cells[5].style.backgroundColor='#2a3666';
						 }
				   }
				 
			    }

		 }
		


		
		function tblRollOut(xRow)
		{
		var rows=document.getElementById('distTable').getElementsByTagName("TR");
		
			 for (var j=0; j<rows.length; j++)  
			   {
				var cells=rows[j].getElementsByTagName("TD");
					  for (var i=0; i<cells.length; i++)  
						 {
						  if(cells[i].className=="d")
						  {
						  cells[i].style.backgroundColor='#dededf';
						  cells[i].style.color='#666666';
						  }
						  else if(cells[i].className=="b")
						  {
						  cells[i].style.backgroundColor='#b38f2f';
						  cells[i].style.color='#000000';
						  }
						  else
						  {
						  cells[i].style.backgroundColor='';
						  cells[i].style.color='#000000';
						  }
					   } 
					 }
				
		}
		

