﻿// JScript File
   
// Magnum Eye....     
     
 

var XmlHttpGridDetails;

function CreateXmlHttpGridDetails()
{
    try
	{
		XmlHttpGridDetails = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e)
	{
		try
		{
			XmlHttpGridDetails = new ActiveXObject("Microsoft.XMLHTTP");
		} 
		catch(oc)
		{
			XmlHttpGridDetails = null;
		}
	}
	if(!XmlHttpGridDetails && typeof XMLHttpRequest != "undefined") 
	{
		XmlHttpGridDetails = new XMLHttpRequest();
	}
}

function GridDetailsWindow(TdDetails,FinCode,Exchg,rowid)
{
    CreateXmlHttpGridDetails();
    var currentDivObj = document.getElementById(TdDetails);
    currentDivObj.innerHTML ="<img src=../App_Themes/Common/Images/loading.gif>";
    document.body.style.cursor = "progress";
  
    
    var requestUrl = "../CommonControls/ProfitMatrixGridDetails.aspx?FinCode="+FinCode+"&Exchg="+Exchg+"&rowid="+rowid;
    
    if(XmlHttpGridDetails!=null)	
	{
	    XmlHttpGridDetails.onreadystatechange = function(){ChangeResponseGridDetails(TdDetails)}
		XmlHttpGridDetails.open('GET', requestUrl,  true);
		XmlHttpGridDetails.send(null);
	}

    return false;
}

function ChangeResponseGridDetails(TdDetails)
{
	if(XmlHttpGridDetails.readyState == 4)
	{
	    var td_Id = document.getElementById(TdDetails);
		if(XmlHttpGridDetails.status == 200)//
		{
		td_Id.innerHTML =  XmlHttpGridDetails.responseText;
			document.body.style.cursor = "auto";		
		}
		else
		{
		    td_Id.innerHTML =  "There was a problem retrieving data from the server.";
			document.body.style.cursor = "auto";
		}
	}
}	


  
    
    var XmlHttpFO;

//Creating object of XMLHTTP For AJAX Method
function CreateXmlHttpEye()
	{
		//Creating object of XMLHTTP in IE
		try
		{
			XmlHttpEye = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e)
		{
			try
			{
				XmlHttpEye = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch(oc)
			{
				XmlHttpEye = null;	
			}
		}
		//Creating object of XMLHTTP in Mozilla and Safari 
		if(!XmlHttpEye && typeof XMLHttpRequest != "undefined") 
		{
			XmlHttpEye = new XMLHttpRequest();
		}
	}
    function NewPopupEye(NewsID,NewsDate,SecId,SubSecId,NewsType,FinCode)
    {
        
		document.body.style.cursor = "progress";
		var requestUrl = "../CommonControls/NewsDetails.aspx?FinCode="+FinCode +"&timeStamp="+ new Date().getTime() +"&SecId="+SecId+"&SubSecID="+SubSecId+"&NewsID="+NewsID+"&NewsDate="+NewsDate+"&NewsType="+NewsType;	
	 CreateXmlHttpEye();
	     if(XmlHttpEye)	
		{
		    XmlHttpEye.onreadystatechange = function(){getNewsRespEye()};
			XmlHttpEye.open("GET", requestUrl,  true);
			XmlHttpEye.send(null);
		}
    }
    
    function getNewsRespEye()
    {

	if(XmlHttpEye.readyState == 4)
	{
		// To make sure valid response is received from the server, 200 means response received is OK
		var td_Id = document.getElementById("divNews").style.display="inline";
		document.getElementById("divNews").style.top = tempY + "px";


		if(XmlHttpEye.status == 200)//
		{
		//alert(XmlHttpEye.responseText);
			document.getElementById("TDNews").innerHTML =  XmlHttpEye.responseText;
				
			document.body.style.cursor = "auto";		
		}
		else
		{
			td_Id.innerHTML =  "There was a problem retrieving data from the server.";
			document.body.style.cursor = "auto";
		}
	}
}


function ShowdetailsFull(rowid,FinCode,Exchg,Cnt)
    {
        var GridId,GridPlusID,GridMinusID;
        
        for(i=10; i<=Cnt; i++)
			{
			  GridId="Griddetails" + i;
			  GridPlusID="Grid1Plus"+ i;
			  GridMinusID="Grid1Minus"+ i;
			//  	   DivID="#sdiv"+i;
			  	   
			if (i==rowid)
			{
			document.getElementById(GridId).style.display = "inline";   
			document.getElementById(GridPlusID).style.display = "none";  
           document.getElementById(GridMinusID).style.display = "inline";  
             //$("#sdiv10").slideDown(500);

			}
			else
			{
		   document.getElementById(GridId).style.display = "none";   
		   document.getElementById(GridPlusID).style.display = "inline";  
           document.getElementById(GridMinusID).style.display = "none";  
			}
		
		}
		  var tdet="Griddetails"+rowid;
    GridDetailsWindow(tdet,FinCode,Exchg,rowid);
		
		}

function Showdetails1(rowid,FinCode,Exchg,Cnt)
    {
        var GridId,GridPlusID,GridMinusID;
        
        for(i=10; i<=Cnt-1; i++)
			{
			  GridId="Griddetails" + i;
			  GridPlusID="Grid1Plus"+ i;
			  GridMinusID="Grid1Minus"+ i;
			//  	   DivID="#sdiv"+i;
			  	   
			if (i==rowid)
			{
			document.getElementById(GridId).style.display = "inline";   
			document.getElementById(GridPlusID).style.display = "none";  
           document.getElementById(GridMinusID).style.display = "inline";  
             //$("#sdiv10").slideDown(500);

			}
			else
			{
		   document.getElementById(GridId).style.display = "none";   
		   document.getElementById(GridPlusID).style.display = "inline";  
           document.getElementById(GridMinusID).style.display = "none";  
			}
		
		}
		  var tdet="Griddetails"+rowid;
    GridDetailsWindow(tdet,FinCode,Exchg,rowid);
		
		}
		
function Showdetails2(rowid,FinCode,Exchg,Cnt)
    {
        var GridId,GridPlusID,GridMinusID;
		for(i=20; i<=Cnt-1; i++)
			{
			  GridId="Griddetails" + i;
			  GridPlusID="Grid2Plus"+ i;
			  GridMinusID="Grid2Minus"+ i;
			   //DivID="#sdiv"+i;
			  
			if (i==rowid)
			{
			document.getElementById(GridId).style.display = "inline";   
			document.getElementById(GridPlusID).style.display = "none";  
           document.getElementById(GridMinusID).style.display = "inline";  
         //  $(DivID).slideDown(1000);

			}
			
			else
			{
		   document.getElementById(GridId).style.display = "none";   
		   document.getElementById(GridPlusID).style.display = "inline";  
           document.getElementById(GridMinusID).style.display = "none";  
			}
		}
        
        
    var tdet="Griddetails"+rowid;
    GridDetailsWindow(tdet,FinCode,Exchg,rowid);
    
    
    
    }
    



 function Hidedetails(Str)
{
	var GridId,GridPlusID,GridMinusID,DivID;
	
	
	 GridId="Griddetails" + Str;
	 GridPlusID="Grid1Plus"+ Str;
	 GridMinusID="Grid1Minus"+ Str;
	
	 document.getElementById(GridId).style.display="none";
 	 document.getElementById(GridPlusID).style.display="inline";
     document.getElementById(GridMinusID).style.display="none";
    //$("#sdiv10").slideUp(1000);
  
    }
    
         
     function RedirectPMEye(search)
{
   
            var requestUrl;
            requestUrl = "../CompanyProfile/QuoteFinder.aspx?timeStamp="+ new Date().getTime() +"&FinCode="+search +"&Mode=S&id=1";        
            window.location = requestUrl;
      

}
   
     
     
     
     
     function RemoveC2P()
{
        if(document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_txtSchName").value=="Enter Company Name")
        {
            document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_txtSchName").value="";
        }
}





function CreateXmlHttpNewC2P()
{
   //Creating object of XMLHTTP in IE
	try
	{
	 
		XmlHttpNewC2P = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e)
	{
	    try
		{
			XmlHttpNewC2P = new ActiveXObject("Microsoft.XMLHTTP");
		} 
		catch(oc)
		{
			
			XmlHttpNewC2P = null;	
		}
	}
	//Creating object of XMLHTTP in Mozilla and Safari 
	if(!XmlHttpNewC2P && typeof XMLHttpRequest != "undefined") 
	{
		XmlHttpNewC2P = new XMLHttpRequest();
	}
}

function SchResultEye()
 {
 	 var txtSchName = document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_txtSchName");
	 if(txtSchName.value=="Enter Company Name")
	{ 
	alert("Please Enter some text");
	} 
	else
		{
 		var SearchResult = document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_lbSchResult");	
 		
		CreateXmlHttpNewC2P();
		document.body.style.cursor = "progress";
		var requestUrl = "../CommonControls/GetSchDataAjax.aspx?timeStamp="+ new Date().getTime() +"&txtSchName="+txtSchName.value;
	
		if(XmlHttpNewC2P)	{
					XmlHttpNewC2P.onreadystatechange = function(){fillSymbolRespEye(SearchResult)};
					XmlHttpNewC2P.open("GET", requestUrl,  true);
					XmlHttpNewC2P.send(null);
				}
				}
		
 }
 
 //Called when response comes back from server Only For Symbol
function fillSymbolRespEye(ig_)
{

	// To make sure receiving response data from server is completed
	if(XmlHttpNewC2P.readyState == 4)
	{
		
		// To make sure valid response is received from the server, 200 means response received is OK
		if(XmlHttpNewC2P.status == 200)
		{		
			//alert(ig_)
			//var availSchemes   = document.getElementById(ig_);
			var strData = XmlHttpNewC2P.responseText
			//alert(strData)
			if(strData != "") {	
			    
				var arrSchm = strData.split("|");
				ig_.length = 0; 	
				
				for(i=0; i<arrSchm.length-1; i++) {	
								
					var strSchm = arrSchm[i];
					var arrSchmCode = strSchm.split("~");
					
					ig_.options[i] = new Option();
					
					ig_.options[i].value = arrSchmCode[0];
					ig_.options[i].text = arrSchmCode[1];
				}
				
			}
			else {
					ig_.length = 0;
					ig_.options[0] = new Option(); 
					ig_.options[0].value = "";
					ig_.options[0].text = "No Data Found";			
			}
			document.body.style.cursor = "auto";	
		}
		else {
					ig_.length = 0;
					ig_.options[0] = new Option(); 
					ig_.options[0].value = "";
					ig_.options[0].text = "server is not ready";
					document.body.style.cursor = "auto";		
		}
	}
}




	function DeleteSch()
	{
	
    var SchMine=document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_lbSchMine");
 
    if (SchMine.selectedIndex<0)
	 {
	 alert("Please select a name from list");
	 return false;
	 }
	 
    if (SchMine.selectedIndex==0)
    {
    if (SchMine.options[1] == null)
    {
    alert('The only remaining Name cannot be deleted');
    return false;
    }
    }
    
    
      SchMine.options[SchMine.selectedIndex] = null;


	
	return false;
	
	}
	
	
	function MoveUpSch()
	{

    var SchMine=document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_lbSchMine");
	var TempVal1 ,TempTxt1;
	var TempVal2 ,TempTxt2;
	 
	 if (SchMine.selectedIndex<0)
	 {
	 alert("Please select a name from list");
	 return false;
	 }
	
	 
	 if (SchMine.selectedIndex<=0)
	 {
	 return false;
	 }
	 
	 TempVal1=SchMine.options[SchMine.selectedIndex].value;
	 TempTxt1=SchMine.options[SchMine.selectedIndex].outerText; 
	 
     TempVal2=SchMine.options[SchMine.selectedIndex-1].value;
	 TempTxt2=SchMine.options[SchMine.selectedIndex-1].outerText; 
	 
	
	SchMine.options[SchMine.selectedIndex].value = TempVal2;
	SchMine.options[SchMine.selectedIndex].text = TempTxt2; 
	
	SchMine.options[SchMine.selectedIndex-1].value = TempVal1;
	SchMine.options[SchMine.selectedIndex-1].text = TempTxt1; 
	
	
	SchMine.selectedIndex = SchMine.selectedIndex-1;
	}
	
	
		function MoveDownSch()
	{

	 var SchMine=document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_lbSchMine");
	var TempVal1 ,TempTxt1;
	var TempVal2 ,TempTxt2;
	 var len = SchMine.length;
	 
	 if (SchMine.selectedIndex<0)
	 {
	 alert("Please select a name from list");
	 return false;
	 }
	
	 
	  if (SchMine.selectedIndex>=len-1)
	 {
	 return false;
	 }
	 
	 TempVal1=SchMine.options[SchMine.selectedIndex].value;
	 TempTxt1=SchMine.options[SchMine.selectedIndex].outerText; 
	 
     TempVal2=SchMine.options[SchMine.selectedIndex+1].value;
	 TempTxt2=SchMine.options[SchMine.selectedIndex+1].outerText; 
	 
	
	SchMine.options[SchMine.selectedIndex].value = TempVal2;
	SchMine.options[SchMine.selectedIndex].text = TempTxt2; 
	
	SchMine.options[SchMine.selectedIndex+1].value = TempVal1;
	SchMine.options[SchMine.selectedIndex+1].text = TempTxt1; 
	SchMine.selectedIndex = SchMine.selectedIndex+1;
	
	}


function StoreSch()
{
    var search=document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_lbSchResult");
    var SchMine=document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_lbSchMine");
   
    var len = SchMine.length;
        if(len>=10)
        {
            alert('You already have the maximum limit of Ten');
              return false;
        }
       
       for(i=0; i<len; i++)
        {
		 if (SchMine.options[i].text == search.options[search.selectedIndex].outerText)
		 {
		 alert("You already have this Name in your list");
		 return false;
		 }
	
		}
     
    
    
    
    SchMine.options[len] = new Option();
    SchMine.options[len].value = search.value;
	SchMine.options[len].text = search.options[search.selectedIndex].outerText; 

    
        if(search=="")
        {
            alert('select Company Name');
        }
       
       return false;
       
        }
        
function SaveSch()
   {   
   
     var SchMine=document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_lbSchMine");
     
      var len = SchMine.length;
      
      if (len>=1)
      
      {
     
        if (SchMine.options[0].value!="" && SchMine.options[0].text!="")
	{
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchValue0").value=SchMine.options[0].value;
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchText0").value=SchMine.options[0].text;
   	}
   	
   	}
	  if (len>=2)
    {
    
	if (SchMine.options[1].value!="" && SchMine.options[1].text!="")
	{
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchValue1").value=SchMine.options[1].value;
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchText1").value=SchMine.options[1].text;
   	}
 	}
	  if (len>=3)
    {
  	
	if (SchMine.options[2].value!="" && SchMine.options[2].text!="")
	{
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchValue2").value=SchMine.options[2].value;
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchText2").value=SchMine.options[2].text;
   	}
 	}
	  if (len>=4)
    {
  	
	if (SchMine.options[3].value!="" && SchMine.options[3].text!="")
	{
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchValue3").value=SchMine.options[3].value;
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchText3").value=SchMine.options[3].text;
   	}
 	}
	  if (len>=5)
    {
  	
	if (SchMine.options[4].value!="" && SchMine.options[4].text!="")
	{
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchValue4").value=SchMine.options[4].value;
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchText4").value=SchMine.options[4].text;
   	}
 	}
	  if (len>=6)
    {
  	
	if (SchMine.options[5].value!="" && SchMine.options[5].text!="")
	{
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchValue5").value=SchMine.options[5].value;
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchText5").value=SchMine.options[5].text;
   	}
 	}
	  if (len>=7)
    {
  	
	if (SchMine.options[6].value!="" && SchMine.options[6].text!="")
	{
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchValue6").value=SchMine.options[6].value;
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchText6").value=SchMine.options[6].text;
   	}
 	}
	  if (len>=8)
    {
  	
	
	if (SchMine.options[7].value!="" && SchMine.options[7].text!="")
	{
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchValue7").value=SchMine.options[7].value;
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchText7").value=SchMine.options[7].text;
   	}
 	}
	  if (len>=9)
    {
  	
	
	if (SchMine.options[8].value!="" && SchMine.options[8].text!="")
	{
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchValue8").value=SchMine.options[8].value;
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchText8").value=SchMine.options[8].text;
   	}
 	}
	  if (len>=10)
    {
  	
	if (SchMine.options[9].value!="" && SchMine.options[9].text!="")
	{
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchValue9").value=SchMine.options[9].value;
    document.getElementById("ctl00_Profitmatrix1_AddEditProfitMatrix1_hidSchText9").value=SchMine.options[9].text;
   	}
 	}
 	

 	 document.getElementById("ProfitMatrixVieW").style.display="inline" ;
     document.getElementById("AddEditView").style.display='none';
}



function MovePrev()
	{
 //	 document.getElementById("GridView1").style.display="inline" ;
  //   document.getElementById("GridView2").style.display='none';
  
    document.getElementById("ShowPrev").style.display="none";
    document.getElementById("ShowNext").style.display="inline";
      MatrixGridData(1);
  
    }
    
    function MoveNext()
	{
 		
  //   document.getElementById("GridView1").style.display='none';
  //   document.getElementById("GridView2").style.display="inline" ;
  
      document.getElementById("ShowPrev").style.display="inline";
      document.getElementById("ShowNext").style.display="none";
      MatrixGridData(2);
  
    }
    
    
    function AddEditProfitMatrix()
{ 
      document.getElementById("ProfitMatrixVieW").style.display="none" ;
      document.getElementById("AddEditView").style.display='inline';
} 
function OpenClose(Str)
	{
	
	if (Str==1)
	{
 	 document.getElementById("ShowGr").style.display="inline" ;
        document.getElementById("Plus").style.display="none" ;
        document.getElementById("Minus").style.display="inline" ;
    }
    
	if (Str==2)
	{
 	 document.getElementById("ShowGr").style.display="none" ;
        document.getElementById("Plus").style.display="inline" ;
        document.getElementById("Minus").style.display="none" ;
    }
    }
    function AddClose()
	{
	 document.getElementById("ProfitMatrixVieW").style.display="inline" ;
     document.getElementById("AddEditView").style.display='none';
   
    }
    
    



var XmlHttpMatrixGridData;
function CreateXmlHttpMatrixGridData()
{
	try
	{
		XmlHttpMatrixGridData = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e)
	{
		try
		{
			XmlHttpMatrixGridData = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(oc)
		{
			XmlHttpMatrixGridData = null;				
		}
	}
	if(!XmlHttpMatrixGridData && typeof XMLHttpRequest != "undefined")
	{
		XmlHttpMatrixGridData = new XMLHttpRequest();
	}
}

function MatrixGridData(PageNo)
{
    CreateXmlHttpMatrixGridData();
   
	document.body.style.cursor = "progress";
	
	
	var requestUrl = "../CommonControls/AjaxProfitMatrixGrid.aspx?PageNo="+ PageNo +"&timeStamp="+new Date().getTime();
   document.getElementById("ctl00_Profitmatrix1_ProfitMatrixGrid1_GridBind1").innerHTML ="<img src=../App_Themes/Common/images/loading.gif>"; 
	if(XmlHttpMatrixGridData!=null)	
	{
	    XmlHttpMatrixGridData.onreadystatechange = function(){ChangeMatrixGridData()}
		XmlHttpMatrixGridData.open('GET', requestUrl,  true);
		XmlHttpMatrixGridData.send(null);
	}
	return false; 
}	
	
function ChangeMatrixGridData()
{
  
	
	if(XmlHttpMatrixGridData.readyState == 4)
	{
		var td_IdComm = document.getElementById("ctl00_Profitmatrix1_ProfitMatrixGrid1_GridBind1");
		
		if(XmlHttpMatrixGridData.status == 200)//
		{
			td_IdComm.innerHTML =  XmlHttpMatrixGridData.responseText;
			document.body.style.cursor = "auto";		
		}
		else
		{
			td_IdComm.innerHTML =  "There was a problem retrieving data from the server.";
			document.body.style.cursor = "auto";
		}
	}
}
	
	
	
function MatrixRefresh()
	{
	
	if (document.getElementById("ShowNext").style.display=="none")
	{
	
	 MatrixGridData(2);
	}
    else
    {
     MatrixGridData(1);
    }
    
    
    LoadMagnumEyeData() ;
    
    }
    
    
    
    var tempX = 0;
 var tempY = 0;
 var m_show = 0;
 var f_sc_id = "";
 var f_sc_dispid = "";
 var f_sc_comp = "";
 var f_topic_id = 0;
 var f_buy_id =0;

 //setInterval("hide_popup1()",1000);
 
 var IE = document.all?true:false
 
 if (!IE) document.captureEvents(Event.MOUSEMOVE)
 document.onmousemove = getMouseXY;
 
 function getMouseXY(e) 
 {
 	if(IE)
 	{
 	  //  tempX = event.clientX + screen.width/2 ;
 	 tempY = document.body.scrollTop+50;

 	}
 	else
 	{
 		tempX = e.pageX;
 	    tempY = e.pageY;
 	}
 	return true;
 }


var ShowIndexCtrl;
function CreateShowIndexCtrl()
	{
		//Creating object of XmlHttp in IE
		try
		{
			ShowIndexCtrl = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e)
		{
			try
			{  
				ShowIndexCtrl = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch(oc)
			{
				ShowIndexCtrl = false;	
			}
		}
		//Creating object of XmlHttp in Mozilla and Safari 
		if (!ShowIndexCtrl && typeof XMLHttpRequest!='undefined') 
		{
	        try 
	        {
		        ShowIndexCtrl = new XMLHttpRequest();
	        } 
	        catch (e) 
	        {
		        ShowIndexCtrl=false;
	        }
        }
        if (!ShowIndexCtrl && window.createRequest) 
        {
	        try 
	        {
		        ShowIndexCtrl = window.createRequest();
	        } 
	        catch (e)
	        {
		        ShowIndexCtrl=false;
	        }
        }
	
	}
	
function ShowIndexCtrl_Comm()
{

   CreateShowIndexCtrl();
    var currentDivObj = document.getElementById("IndexControlData_Comm");
	document.body.style.cursor = "progress";

	var requestUrl = "../CommonControls/AjaxIndexControl_Comm.aspx?timeStamp="+new Date().getTime();
	if(ShowIndexCtrl!=null)	
	{
	    ShowIndexCtrl.onreadystatechange = function(){ChangeShowIndexCtrl()}
		ShowIndexCtrl.open('GET', requestUrl,  true);
		ShowIndexCtrl.send(null);
	}
	return false; 
}

function ChangeShowIndexCtrl()
{
   	if(ShowIndexCtrl.readyState == 4)
	{
		var Td_DataDeriFii = document.getElementById("IndexControlData_Comm");
		
		if(ShowIndexCtrl.status == 200)//
		{
			Td_DataDeriFii.innerHTML =  ShowIndexCtrl.responseText;
			document.body.style.cursor = "auto";		
		}
		else
		{
			Td_DataDeriFii.innerHTML =  "There was a problem retrieving data from the server.";
			document.body.style.cursor = "auto";
		}
	}
}
