function showTab(selTab){

			if(selTab == "tabMV01") {
				document.getElementById('mostRead').style.display = 'block';
				document.getElementById('mostCommented').style.display = 'none';
				
				document.getElementById('mostReadImg').src ='/template/ver1.0/Images/mostReadAlt.gif';
				document.getElementById('mostReadImg').style.width='80px';
				document.getElementById('mostReadImg').style.height='27px';
				document.getElementById('mostCommentedImg').src ='/template/ver1.0/Images/mostCommented.gif';
				document.getElementById('mostCommentedImg').style.width='112px';
				document.getElementById('mostCommentedImg').style.height='27px';
				
			} else if(selTab == "tabMV02"){
				document.getElementById('mostRead').style.display = 'none';
				document.getElementById('mostCommented').style.display = 'block';
				document.getElementById('mostReadImg').src ='/template/ver1.0/Images/mostRead.gif';
				document.getElementById('mostReadImg').style.width='80px';
				document.getElementById('mostReadImg').style.height='27px';
				document.getElementById('mostCommentedImg').src ='/template/ver1.0/Images/mostCommentedAlt.gif';
				document.getElementById('mostCommentedImg').style.width='112px';
				document.getElementById('mostCommentedImg').style.height='27px';
				
			}

}

  function createXMLHttpRequestStatistics(){
	  var req;
	  if (window.XMLHttpRequest){
		req = new XMLHttpRequest();
	} else if (window.ActiveXObject){
		req = new ActiveXObject("Microsoft.XMLHTTP");
	}
	return req;
  }

 	function getAutonomyStatistics(XMLHttpRec,articleIds,divId) {
 		// alert(articleIds);
		 // Abort any currently pending requests for this XMLHttpRequest Object
		 XMLHttpRec.onreadystatechange = function () {}
		 XMLHttpRec.abort();
		 var urlMapping = "";
		  
		 if(urlMapping ==""){
			urlMapping="";
		 }else	{
			urlMapping="/" + urlMapping;
		  }
		
		 var url = urlMapping+"/getStatisticsList?articleIds="+articleIds+"&action=statistics";
		 XMLHttpRec.open("GET", url, true);
		 XMLHttpRec.onreadystatechange = function () {
		               callbackStatistics(XMLHttpRec,divId);
		 }
		 XMLHttpRec.send(null);

 	} // end of function


	function callbackStatistics(req,divId){
	  if (req.readyState==4){
      if (req.status == 200){
      	if (window.ActiveXObject){
          	msPopulateStatistics(req,divId);
		}else if (window.XMLHttpRequest){
            nonMSPopulateStatistics(req,divId);        
         }
      	}
      }
	 }

	function nonMSPopulateStatistics(r,divId){
		// alert("Inside  nonMSPopulate");
   		var resp = r.responseText;
		 // alert("Inside  nonmsPopulate : " + resp);
		var myJSONObject = eval('(' + resp + ')');
		displayStatistics(myJSONObject,divId);
	}

	function msPopulateStatistics(r,divId){
  		// alert("Inside  msPopulate");
		var resp = r.responseText;
	 	// alert("Inside  msPopulate : " + resp);
	   	var myJSONObject = eval('(' + resp + ')');
		displayStatistics(myJSONObject,divId);
		   	
  	}

	function displayStatistics(infoObj,divId){
		var i;
	    var mostHTML = "";   
		if (typeof(infoObj.comment)=="undefined")
		{
			mostHTML += 'No Data Found';
			return;
		}
		
		for (i = 0; i < infoObj.comment.length; i++)
		{
			var mostId = infoObj.comment[i];
			if (typeof(mostId.articleTitle)!="undefined")
			{
			mostHTML+="<div class='onlyFLeft' style='margin-top:4px;'><span class='mostArrow'>";
			mostHTML+="<img src='/template/ver1.0/Images/arrow.gif' height='5' width='4' border='0' /></span>";
			mostHTML+="<span class='mostInnerTxt'><a href='"+mostId.articleUrl+"?autnRef=" + mostId.articleReference + "'>"+mostId.articleTitle+"</a></span></div>";
			}
		}
		document.getElementById(divId).innerHTML = mostHTML;
	}

