function RowsToTabs()
{
	this.TabPages;

	// Databinding for property TabPages
	this.SetTabPages = function(data)
	{
		///UserCodeRegionStart:[SetTabPages] (do not remove this comment.)

        this.TabPages = data;
		
		
		///UserCodeRegionEnd: (do not remove this comment.)
	}

	// Databinding for property TabPages
	this.GetTabPages = function()
	{
		///UserCodeRegionStart:[GetTabPages] (do not remove this comment.)

		return this.TabPages;	
		
		
		///UserCodeRegionEnd: (do not remove this comment.)
	}

	this.show = function()
	{
		///UserCodeRegionStart:[show] (do not remove this comment.)


			if (!this.IsPostBack){
		
		var TabPages = this.TabPages;
		var nameUC = this.ContainerName;
		
		$(document).ready(function() {
			var html = '<div id="tabContainer"><div class="tabs">';
		 	html += '<ul>';
		  for(var i =0 ; i< TabPages.length;i++)
		  {
			  var oname = TabPages[i].split(":")[0];
			  oname = oname.substring(0,1).toUpperCase() + oname.substring(1,oname.length).toLowerCase();
			  var cname = TabPages[i].split(":")[1];	  
			  html += '<li id="tabHeader_'+i+'">'+cname+'</li>';
			   $("#"+oname).hide();
		   }
		   html += '</ul></div></div>';
			$("#"+nameUC).html(html);
			for(var i =0 ; i< TabPages.length;i++)
		  {
			   var oname = TabPages[i].split(":")[0];
			   oname = oname.substring(0,1).toUpperCase() + oname.substring(1,oname.length).toLowerCase();
			 var cname = TabPages[i].split(":")[1];	
				if(i==0){
					$("#tabHeader_"+i ).addClass("tabActiveHeader");
				  	$("#"+oname).attr("data-current",1);
					var $kids = $("#"+oname).children();
					$kids.addClass("tabscontent");
					$("#"+oname).show();
					
					}
			 $("#tabHeader_"+i).click(function (){
				   $('tr[data-current*="1"]').hide();
				   $('tr[data-current="1"]').removeAttr("data-current");
				   $('li[id*="tabHeader_"]').removeClass("tabActiveHeader");
				   var id =  $(this).attr("id").split("_")[1];
				   var oname = TabPages[id].split(":")[0];
				     oname = oname.substring(0,1).toUpperCase() + oname.substring(1,oname.length).toLowerCase();
					$(this).addClass("tabActiveHeader");
					var $kids = $("#"+oname).children();
					$kids.addClass("tabscontent");
					$("#"+oname).show();
					$('#'+oname).attr("data-current",1);
					
				 });
			  
		   }
			
});}
	
 
		
		///UserCodeRegionEnd: (do not remove this comment.)
	}
	///UserCodeRegionStart:[User Functions] (do not remove this comment.)


	
	///UserCodeRegionEnd: (do not remove this comment.):
}
