﻿/* Function Using in Fotter to search Mutaual fund */

 function MFA2ZTd()
 {

 	var A2ZIndexId = document.getElementById("MFA2ZTd");
    var A2Z="";
	var A2ZStr="";
			for(i=65; i<=90; i++)				
			{
				var Alpha = String.fromCharCode(i);
			
				var BorderStyle="text-decoration:none";
			if (i<90)
				{
				var BorderStyle="text-decoration:none";
				}
			    A2Z +="| ";
				A2Z += "<a href='mutualfund/daily-nav.html?Alphabet="+Alpha+"&id=3' class='BottomLinks2' style='"+BorderStyle+"'>"+Alpha+"</a>";
				

			}
			
	
		
		
		A2ZStr+= "<table cellpadding='0' cellspacing='0' border='0' >";
		A2ZStr+= "<tr>";
		A2ZStr+= "<td align='left'>";
		A2ZStr+= "<span class='BottomLinks2' >Mutual Fund : </span>&nbsp;&nbsp;";
		A2ZStr+= "</td>";
		A2ZStr+= "<td align='left'>";
		A2ZStr+= "<table border='0' cellspacing='0' cellpadding='0'  >";
		A2ZStr+= "<tr >";
		A2ZStr+= "<td >";
		A2ZStr+= A2Z;		
		A2ZStr+= "</td>";
		A2ZStr+= "</tr>";
		A2ZStr+= "</table>";
		A2ZStr+= "</td>";
		A2ZStr+= "</tr>";
		A2ZStr+= "</table>" ;
		
		
		
		
        A2ZIndexId.innerHTML = A2ZStr;


}	/*End of search Mutaual fund function */
/* Function Using in Fotter to search companies */

 function StocksA2ZTd()
 {

 	var A2ZIndexId = document.getElementById("StocksA2ZTd");
    var A2Z="";
	var A2ZStr="";
			for(i=65; i<=90; i++)				
			{
				var Alpha = String.fromCharCode(i);
			
				var BorderStyle="text-decoration:none";
			if (i<90)
				{
				var BorderStyle="text-decoration:none";
				}
			    A2Z +="| ";
				A2Z += "<a href='CompanyProfile/Company-List.html?SrchQuote="+Alpha+"' class='BottomLinks2' style='"+BorderStyle+"'>"+Alpha+"</a>";
							

			

			}
			
	
		
		
		A2ZStr+= "<table cellpadding='0' cellspacing='0' border='0' >";
		A2ZStr+= "<tr>";
		A2ZStr+= "<td align='left'>";
		A2ZStr+= "<span class='BottomLinks2' >STOCKS : </span>&nbsp;&nbsp;";
		A2ZStr+= "</td>";
		A2ZStr+= "<td align='left'>";
		A2ZStr+= "<table border='0' cellspacing='0' cellpadding='0'  >";
		A2ZStr+= "<tr >";
		A2ZStr+= "<td >";
		A2ZStr+= A2Z;
		
		A2ZStr+= "</td>";
		A2ZStr+= "</tr>";
		A2ZStr+= "</table>";
		A2ZStr+= "</td>";
		A2ZStr+= "</tr>";
		A2ZStr+= "</table>" ;
		
		
		
		
        A2ZIndexId.innerHTML = A2ZStr;


}	/*End of search company function */




// JScript File

function CreateXmlHttpNewsHome()
{
	try
	{
		XmlHttpNewsHome = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e)
	{
		try
		{
			XmlHttpNewsHome = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(oc)
		{
			XmlHttpNewsHome = null;				
		}
	}
	if(!XmlHttpNewsHome && typeof XMLHttpRequest != "undefined")
	{
		XmlHttpNewsHome = new XMLHttpRequest();
	}
}


function GetNewsHotGlobalHome(SecID,SubSec)
{	


    CreateXmlHttpNewsHome();
   
	document.body.style.cursor = "progress";
	
	var requestUrl = "homecontrols/HomenewsAjaxHome.aspx?Sec="+ SecID +"&SubSec="+SubSec+"&IpTrack="+ window.location.hostname +"&timeStamp="+new Date().getTime();
	 //alert(requestUrl);
	if(XmlHttpNewsHome)
	{
	    XmlHttpNewsHome.onreadystatechange = function(){getDataResponseHotHome();};
		XmlHttpNewsHome.open("GET", requestUrl,  true);			
		XmlHttpNewsHome.send(null);
	
	}
	
}

function getDataResponseHotHome()
{

 
    if(XmlHttpNewsHome.readyState == 4)
	{	
		    if(XmlHttpNewsHome.status == 200)
		{
				
		    var NewTd = document.getElementById("NewsTdGlobal");
			var NewData = XmlHttpNewsHome.responseText;
			
			if(NewData != "")
			
				NewTd.innerHTML = NewData;	
						
			document.body.style.cursor = "auto";
			
		}
	}
}

function Select_Tab(_id)
{
 var i;
  for( i=1; i<6; i++)
  {
    if(_id==i)
    {
     document.getElementById("New"+i).className="current";
     if(_id=="1")
     {
     GetNewsHotGlobalHome('4','38')
     }
      if(_id=="2")
     {
     GetNewsHotGlobalHome('7','15')
     }
       if(_id=="3")
     {
     GetNewsHotGlobalHome('5','56')
     }
      if(_id=="4")
     {
     GetNewsHotGlobalHome('5','23,24,25,26,36,43,44,49');

     }
      if(_id=="5")
     {
     GetNewsHotGlobalHome('4','9')
     }
    }
    else
    {
    document.getElementById("New"+i).className="glossymenu1";
    }
  }
}





    
//<------------->//
    /* Function using in homepage to show - ipo, commodity,equity chartss */

//Home Right Control..

   function ShowGraphData(id)
    {
      if(id=="E")
      {
    
        //alert("p");
     
     
      
        document.getElementById("TrE").style.display="";
        document.getElementById("TrOther").style.display="none";
         document.getElementById("Trgraph").style.display="none";
         document.getElementById("treq").style.display="";
         
      }
      else
      {
         document.getElementById("TrE").style.display="none";
         document.getElementById("TrOther").style.display="";
          document.getElementById("Trgraph").style.display="";
             document.getElementById("treq").style.display="none";
      }

 
     if(id=='E')
       { 
       
     
       document.getElementById("lie").className="current";
     document.getElementById("lim").className="TABGLOSSARY";
      document.getElementById("lic").className="TABGLOSSARY";
      document.getElementById("lip").className="TABGLOSSARY";  
       BindChart("BSE");
       ChangeControl('GAIN','BSE');
       //CallSensexNifty('BSE');
       }
       else if(id=='M') 
       {
      
          document.getElementById("lie").className="TABGLOSSARY";
      document.getElementById("lic").className="TABGLOSSARY";
        document.getElementById("lim").className="current";
          document.getElementById("lip").className="TABGLOSSARY";
      document.getElementById("Graph_Td").innerHTML="<table cellpadding='0' cellspacing='0' width='100%'><tr>  <td height='35px' align='left' style='background-color:#f2fbff;padding-left:5px'>  <table cellpadding='0' cellspacing='0' ><tr>      <td style='width: 22px; height: 19px' id='tdBSE' class='BSENSESelct' onclick=loadGLData('1YEARRET','Eqt','TB','Top')>Top</td><td class='BSENSEUnSelct' style='padding-left:5px; padding-right:5px' align='center'>|</td><td style='width: 44px; height: 19px;' id='tdNSE' class='BSENSESelct' onclick=loadGLData('1YEARRET','Eqt','TB','Bott')>Bottom</td></tr></table></td></tr>      <tr><td valign='top' colspan='4'  style='height:119px' valign='top'><div id='MFChart' >Loading.. </div></td></tr></table>";
      loadGLData('1YEARRET','Eqt','TB','Top');
      document.getElementById("trCom").style.display="none";
      document.getElementById("trIpo").style.display="none";
      document.getElementById("trMf").style.display ="inline";   
       } 
        else if(id=='I') 
        {
     
         document.getElementById("lie").className="TABGLOSSARY";
      document.getElementById("lic").className="TABGLOSSARY";
        document.getElementById("lim").className="TABGLOSSARY";
          document.getElementById("lip").className="current";
                document.getElementById("Graph_Td").innerHTML="<table cellpadding='0' cellspacing='0' width='100%'><tr><td valign='top' colspan='4'  style='height:130px' valign='top'><div id='BSENSEChart' >Loading.. </div></td></tr><tr><td id='TD_SENSEXNDATA' colspan='4'></td></tr><tr><td style='height:5px'></td></tr></table>";
               ShowIPOChart();
              // IPOData();
                document.getElementById("trCom").style.display="none";
                document.getElementById("trMf").style.display ="none"; 
                document.getElementById("trIpo").style.display="";  
        } 
         else if(id=='C') 
         {
      
       document.getElementById("lie").className="TABGLOSSARY";
      document.getElementById("lic").className="current";
        document.getElementById("lim").className="TABGLOSSARY";
 document.getElementById("lip").className="TABGLOSSARY";
         
         
       //    document.getElementById("Graph_Td").innerHTML="<table cellpadding='0' cellspacing='0' width='100%'><tr><td align='left' style='background-color:#fce7b0;padding-left:5px' height='35px' ><table cellpadding='0' cellspacing='0' ><tr><td style='width: 22px; height: 19px' id='tdBSE' class='BSENSESelct' onclick=ComData(&#39;GOLD&#39;);ShowChartCom(&#39;Gold&#39;);>Gold</td><td class='BSENSEUnSelct' style='padding-left:5px; padding-right:5px' align='center'>|</td><td style='width: 44px; height: 19px;' id='tdNSE' class='BSENSESelct' onclick=ComData(&#39;Silver&#39;);ShowChartCom(&#39;Silver&#39;);>Silver</td></tr></table></td><td id='TD_SENSEXNDATA' ></td></tr><tr><td valign='top' colspan='4'   valign='top'><div id='CommChart' >Loading.. </div></td></tr></table>";
       document.getElementById("Graph_Td").innerHTML=" <table cellpadding='0' cellspacing='0' width='100%'><tr><td colspan='4' height='35px' align='left' style='background-color:#f2fbff;padding-left:5px'>  <table cellpadding='0' cellspacing='0' ><tr><td style='width: 22px; height: 19px' id='tdBSE' class='BSENSESelct' onclick=ComData(&#39;GOLD&#39;);ShowChartCom(&#39;Gold&#39;);>Gold</td><td class='BSENSEUnSelct' style='padding-left:5px; padding-right:5px' align='center'>|</td><td style='width: 44px; height: 19px;' id='tdNSE' class='BSENSESelct' onclick=ComData(&#39;Silver&#39;);ShowChartCom(&#39;Silver&#39;);>Silver</td></tr></table></td><td id='TD_SENSEXNDATA' ></td></tr>      <tr><td valign='top' colspan='4'  style='height:119px' valign='top'><div id='CommChart' >Loading.. </div></td></tr></table>";
         
          ComData('GOLD');
          ShowChartCom('Gold');
          document.getElementById("trCom").style.display="";
          document.getElementById("trMf").style.display ="none";
        document.getElementById("trIpo").style.display="none";
          } 
         
    }
    function ShowIPOChart()
{
        
	    var so = new SWFObject("amcolumn/amcolumn.swf", "Fundcolumn", "252x", "195", "8", "#f2fbff");
		so.addVariable("path", "amcolumn/");
		so.addParam("wmode","opaque");
		so.addVariable("settings_file", encodeURIComponent("amcolumn/Fundcolumn_settings_Bar.xml"));
		so.addVariable("data_file", encodeURIComponent("homecontrols/AjaxIPOChart.aspx?timeStamp="+ new Date().getTime() ));
	    so.write("BSENSEChart");
	    so.addParam("wmode","opaque");
	    
}


  function BindChart(val)
    {
       
         
            
             if(val=='BSE')
             {
             document.getElementById("bseTab").className="BSENSESelct";
             document.getElementById("nseTab").className="BSENSEUnSelct";
           //  document.getElementById("bseTab").innerHTML="Nifty";
             document.getElementById("ctl00_ContentPlaceHolder1_EQMFIPOCOM1_hdnbsense").value=val;
        
          
        
              // document.getElementById("td3").style.display='';
             }
             else
             {
         
               document.getElementById("bseTab").className="BSENSEUnSelct";
               document.getElementById("nseTab").className="BSENSESelct";
              //  document.getElementById("nseTab").innerHTML="Sensex";
               document.getElementById("ctl00_ContentPlaceHolder1_EQMFIPOCOM1_hdnbsense").value=val;
           
            
             }
//             var so = new SWFObject("amline/amline.swf", "BSENSEline","252px", "148", "8", "#f2fbff");
//	    so.addVariable("path", "amline/");
//		    so.addParam("wmode","opaque");
// 		document.getElementById("ctl00_ContentPlaceHolder1_EQMFIPOCOM1_hdnbsense").value=val;
//  		
//		    so.addVariable("settings_file", encodeURIComponent("amline/Equity_settings.xml"));
//		    so.addVariable("data_file", encodeURIComponent("homecontrols/BSENSEchartAjax.aspx?Exchg="+val+"&TimeStamp="+new Date().getTime()));
//		  //alert("BSENSEchartAjax.aspx?Exchg="+val+"&TimeStamp="+new Date().getTime());
//    	
//		    so.write("TdChart");
//alert(document.getElementById("ctl00_ContentPlaceHolder1_EQMFIPOCOM1_hdnDateOpt").value);
//alert(document.getElementById("ctl00_ContentPlaceHolder1_EQMFIPOCOM1_day").value);
		Profilechart1('H',document.getElementById("ctl00_ContentPlaceHolder1_EQMFIPOCOM1_hdnbsense").value,'<%=FinCode%>',document.getElementById("ctl00_ContentPlaceHolder1_EQMFIPOCOM1_hdnDateOpt").value,document.getElementById("ctl00_ContentPlaceHolder1_EQMFIPOCOM1_day").value);
		   
		    ChangeControl('GAIN',val);  
		    ChangeControlvolumevalue('Vol','BSE');
		      CallSensexNifty(val);
		    //CallSensexNifty(val);
           
    }
           function CallSensexNifty(Exch)
{
//alert();
      var RequestUrl = "homecontrols/AjaxaSenNiftyHome.aspx?Exchange="+Exch+"&timeStamp="+new Date().getTime();   
   //alert(RequestUrl);
 //  var ajax = new Ajax.Updater('tdSensex',RequestUrl)	
     // ajaxpage(100,RequestUrl,'tdSensex');
      ajaxpage(100,RequestUrl,'tdSensex');
}
    function loadGLData(Period,Category,TopGl,typ)
{

        if(typ=='Top')
         {
         document.getElementById("tdBSE").className="BSENSESelct";
         document.getElementById("tdNSE").className="BSENSEUnSelct CursorHand";
         }
         else
         {
         document.getElementById("tdBSE").className="BSENSEUnSelct CursorHand";
         document.getElementById("tdNSE").className="BSENSESelct";
         }
   
	var TopGl;
	if(Period=='')
		Period = "1YEAR";
	if(Category=='')	
		Category="ALL";
		
		//alert(Period)
		//alert(Category)
	 	var so = new SWFObject("amcolumn/amcolumn.swf", "Fundcolumn", "252px", "170", "8", "#f2fbff");
		so.addVariable("path", "amcolumn/");
		so.addParam("wmode","opaque");
		so.addVariable("settings_file", encodeURIComponent("amcolumn/MFHome_settings_Bar.xml"));
		so.addVariable("data_file", encodeURIComponent("homecontrols/AjaxFundData.aspx?Period="+ Period +"&Category="+ Category +"&TopGl="+ TopGl+"&typ="+typ+"&TimeStamp="+new Date().getTime() ));
		//alert("AjaxFundData.aspx?Period="+ Period +"&Category="+ Category +"&TopGl="+ TopGl+"&typ="+typ+"&TimeStamp="+new Date().getTime());
		
	    so.write("MFChart");
	 
	    so.addParam("wmode","opaque");
		
}

function ShowChartCom(opt)
{
/// alert(opt);
  var startDiv="<div id='topkNavContainer'><div id='kNav'>";
       var endDiv ="</div></div>";
	     if(opt=='Gold')
         {
      document.getElementById("tdBSE").className="BSENSESelct";
         document.getElementById("tdNSE").className="BSENSEUnSelct CursorHand";   }
         else
         {
           document.getElementById("tdBSE").className="BSENSEUnSelct CursorHand";
         document.getElementById("tdNSE").className="BSENSESelct";}
		var so = new SWFObject("amline/amline.swf", "Bullionline", "252px", "170", "8", "#f2fbff");
		so.addVariable("path", "amline/");
		so.addParam("wmode","opaque");
		so.addVariable("settings_file", encodeURIComponent("amcolumn/GoldSilverChart.xml"));
		
		///so.addVariable("data_file", encodeURIComponent(GetHostUrlForPages+"/Common/BullionchartComAjax.aspx?Exchg=MCX&Symbol="+opt+"&TimeStamp="+new Date().getTime()));
		
	so.addVariable("data_file", encodeURIComponent("homecontrols/GetPriceChart.aspx?Exchg=MCX&Symbol="+opt+"&ExpDate=null&TimeStamp="+new Date().getTime()));
		
		so.write("CommChart");
}
 function ChangeControlC(Opt,Exch)
    {
  
   //Exch= "NCDX";
      if(Opt=="G")
        {
         document.getElementById("licg").className="BSENSESelct";
         document.getElementById("licl").className="TABGLOSSARY";
      document.getElementById("licv").className="TABGLOSSARY";
       document.getElementById("lica").className="TABGLOSSARY";
        }
     if (Opt=="L")
       {
         document.getElementById("licg").className="TABGLOSSARY";
         document.getElementById("licl").className="BSENSESelct";
      document.getElementById("licv").className="TABGLOSSARY";
       document.getElementById("lica").className="TABGLOSSARY";
       }
         if (Opt=="Vol")
       {
         document.getElementById("licg").className="TABGLOSSARY";
         document.getElementById("licl").className="TABGLOSSARY";
      document.getElementById("licv").className="BSENSESelct";
       document.getElementById("lica").className="TABGLOSSARY";
       }
        if (Opt=="Val")
       {
         document.getElementById("licg").className="TABGLOSSARY";
         document.getElementById("licl").className="TABGLOSSARY";
      document.getElementById("licv").className="TABGLOSSARY";
       document.getElementById("lica").className="BSENSESelct";
       }
    
    
    //alert("tes");
    var ComExgHid = document.getElementById("ComExgHid").value;
    var ComOptHid = document.getElementById("ComOptHid").value;
    
    if (Opt=='')
    {
    Opt=ComOptHid;
    }
    else
    {
    document.getElementById("ComOptHid").value = Opt;
    }
    

  
   
	var requestUrl = "homecontrols/AjaxDataGLCom.aspx?typeGL="+ Opt +"&Exchange="+ Exch+"&timeStamp="+new Date().getTime();	
	//alert(requestUrl);

	ajaxpage(1,requestUrl,'ctl00_ContentPlaceHolder1_EQMFIPOCOM1_ComGLVLl1_Td_ComData');

     
    
    }	

 function ChangeControl(Opt,Exch)
    {
Exch= document.getElementById("ctl00_ContentPlaceHolder1_EQMFIPOCOM1_hdnbsense").value
  
   if(Opt=="GAIN")
        {
         document.getElementById("lig").className="currentbse";
         document.getElementById("lil").className="TABGLOSSARY";
      
        }
     if (Opt=="LOSE")
       {
         document.getElementById("lig").className="TABGLOSSARY";
         document.getElementById("lil").className="currentbse";
    
       }
       
  
  

	    var requestUrl = "homecontrols/AjaxDataGLVV.aspx?Option="+ Opt +"&Exchange="+ Exch; 
	  //alert(requestUrl);

        ajaxpage(1,requestUrl,'ctl00_ContentPlaceHolder1_EQMFIPOCOM1_Td_Data');
        
         var Head_td =document.getElementById("Heading");
        var More=document.getElementById("More");
        var BSE_td =document.getElementById("Td_BSE");
        var NSE_td =document.getElementById("Td_NSE");
	   
        
      
        
        
    }
    
 function ChangeControlvolumevalue(Opt,Exch)
    {
Exch= document.getElementById("ctl00_ContentPlaceHolder1_EQMFIPOCOM1_hdnbsense").value
  
  
         if (Opt=="Vol")
       {
  
      document.getElementById("liv").className="currentbse";
       document.getElementById("liu").className="TABGLOSSARY";
       }
        if (Opt=="Val")
       {
      document.getElementById("liv").className="TABGLOSSARY";
       document.getElementById("liu").className="currentbse";
       }
  
  
   //alert(Exch);
	    var requestUrl = "homecontrols/AjaxDataGLVV.aspx?Option="+ Opt +"&Exchange="+ Exch; 
	  //alert(requestUrl);
      

        ajaxpage(1,requestUrl,'ctl00_ContentPlaceHolder1_EQMFIPOCOM1_Td_Data1');
        
         var Head_td =document.getElementById("Heading");
        var More=document.getElementById("More");
        var BSE_td =document.getElementById("Td_BSE");
        var NSE_td =document.getElementById("Td_NSE");
	   
        
      
        
        
    }
       
    
    
    
    
    
    
    
    
    

function ComData(Val)
{
      var RequestUrl = "Homecontrols/AjaxComData.aspx?InstType="+Val+"&J="+new Date().getTime();
      
       ajaxpage(1,RequestUrl,'TD_SENSEXNDATA');	
       

}	
// JScript File

function Show(id)
    {   
       if(id == "Fii")
         {                  
         document.getElementById("FIIActivites").style.display="inline";
         document.getElementById("MFActivites").style.display="none";
         document.getElementById("fi2").className="current";            
         document.getElementById("MF1").className="glossymenu1";   
         
          }
        if(id == "MF")
         {     
         document.getElementById("FIIActivites").style.display="none";
         document.getElementById("MFActivites").style.display="inline";
         document.getElementById("MF1").className="current";            
         document.getElementById("fi2").className="glossymenu1";             
                              
      
         }                  
    }  
    
    
     function Profilechart1(GraphType,val,FinCode,DateOpt,DateCnt)
{
           
        
            if(DateOpt=='D')
            {
            GraphType="I";
             //alert(GraphType);
              document.getElementById("6Mon").className="BSENSEUnSelctred";
            document.getElementById("1days").className="BSENSESelctred";          
            document.getElementById("3Mon").className="BSENSEUnSelctred";
            document.getElementById("1Mon").className="BSENSEUnSelctred";
            document.getElementById("1Year").className="BSENSEUnSelctred";
            document.getElementById("5Year").className="BSENSEUnSelctred";
            }
             if(DateOpt=='M')
            {
            if( DateCnt=='3')
            {
              document.getElementById("6Mon").className="BSENSEUnSelctred";
            document.getElementById("1days").className="BSENSEUnSelctred";          
            document.getElementById("3Mon").className="BSENSESelctred";
            document.getElementById("1Mon").className="BSENSEUnSelctred";
            document.getElementById("1Year").className="BSENSEUnSelctred";
            document.getElementById("5Year").className="BSENSEUnSelctred";
            }
            else if(DateCnt=='1')
            {  document.getElementById("6Mon").className="BSENSEUnSelctred";
            document.getElementById("1days").className="BSENSEUnSelctred";          
            document.getElementById("3Mon").className="BSENSEUnSelctred";
            document.getElementById("1Mon").className="BSENSESelctred";
            document.getElementById("1Year").className="BSENSEUnSelctred";
            document.getElementById("5Year").className="BSENSEUnSelctred";
            }
             else if(DateCnt=='6')
            {document.getElementById("1days").className="BSENSEUnSelctred";          
            document.getElementById("3Mon").className="BSENSEUnSelctred";
            document.getElementById("1Mon").className="BSENSEUnSelctred";
             document.getElementById("6Mon").className="BSENSESelctred";
            document.getElementById("1Year").className="BSENSEUnSelctred";
            document.getElementById("5Year").className="BSENSEUnSelctred";
            
            }
            }

             if(DateOpt=='Y')
            {
             if( DateCnt=='1')
            {
            document.getElementById("6Mon").className="BSENSEUnSelctred";
            document.getElementById("1days").className="BSENSEUnSelctred";          
            document.getElementById("3Mon").className="BSENSEUnSelctred";
            document.getElementById("1Mon").className="BSENSEUnSelctred";
            document.getElementById("1Year").className="BSENSESelctred";
             document.getElementById("5Year").className="BSENSEUnSelctred";
            }
            else if( DateCnt=='5')
            {
            document.getElementById("6Mon").className="BSENSEUnSelctred";
            document.getElementById("1days").className="BSENSEUnSelctred";          
            document.getElementById("3Mon").className="BSENSEUnSelctred";
            document.getElementById("1Mon").className="BSENSEUnSelctred";
            document.getElementById("1Year").className="BSENSEUnSelctred";
             document.getElementById("5Year").className="BSENSESelctred";
            }
            }
         document.getElementById("ctl00_ContentPlaceHolder1_EQMFIPOCOM1_hdnbsense").value=val; 
          //alert(document.getElementById("ctl00_ContentPlaceHolder1_EQMFIPOCOM1_hdnbsense").value);
          
           document.getElementById("ctl00_ContentPlaceHolder1_EQMFIPOCOM1_day").value=DateCnt; 
          // alert(document.getElementById("ctl00_ContentPlaceHolder1_EQMFIPOCOM1_day").value);
          
        document.getElementById("ctl00_ContentPlaceHolder1_EQMFIPOCOM1_hdnGraphType" ).value=GraphType;
        document.getElementById("ctl00_ContentPlaceHolder1_EQMFIPOCOM1_hdnDateOpt").value=DateOpt;
        var so = new SWFObject("amline/amline.swf", "BSENSEline", "252", "150", "0", "#f2fbff");
	 so.addVariable("path", "amline/");
		    so.addParam("wmode","opaque");
    		
    		
		    so.addVariable("settings_file", encodeURIComponent("amline/Equity_settings.xml"));
		    so.addVariable("data_file", encodeURIComponent("CompanyProfile/MarketChartAjax.aspx?GraphType="+GraphType+"&DateOpt="+DateOpt+"&Exchg="+val+"&DateCnt="+DateCnt+"&fincode="+FinCode+"&TimeStamp="+new Date().getTime()));
    // alert("homecontrols/BSENSEchartAjax.aspx?Exchg="+val+"&DateCnt="+DateCnt+"&fincode="+FinCode+"&TimeStamp=");
		so.write("TdChart");
		
}
    
 //................................................................................................................

function CreateXmlHttpNewsGlobalHome()
	{
		//Creating object of XMLHTTP in IE
		try
		{
			XmlHttpNewsGlobalHome = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e)
		{
			try
			{  
				XmlHttpNewsGlobalHome = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch(oc)
			{
				XmlHttpNewsGlobalHome = false;	
			}
		}
		//Creating object of XmlHttp in Mozilla and Safari 
		if (!XmlHttpNewsGlobalHome && typeof XMLHttpRequest!='undefined') 
		{
	        try 
	        {
		        XmlHttpNewsGlobalHome = new XMLHttpRequest();
	        } 
	        catch (e) 
	        {
		        XmlHttpNewsGlobalHome=false;
	        }
        }
        if (!XmlHttpNewsGlobalHome && window.createRequest) 
        {
	        try 
	        {
		        XmlHttpNewsGlobalHome = window.createRequest();
	        } 
	        catch (e)
	        {
		        XmlHttpNewsGlobalHome=false;
	        }
        }
	}

    function OpenNewsGlobalHomePopUp(NewsID,SecID,SubSecID,Opt)
    {


         CreateXmlHttpNewsGlobalHome();
		document.body.style.cursor = "progress";	
			
//		var requestUrl = "HomeControls/AjaxNewsPopGlobal.aspx?timeStamp="+ new Date().getTime() +"&NewsID="+NewsID +"&Sec="+SecID +"&SubSec="+SubSecID +"&FinCode="+FinCode;
	var requestUrl = "News/GetNews.aspx?timeStamp="+ new Date().getTime() +"&NewsID="+NewsID +"&Sec="+SecID +"&SubSec="+SubSecID ;
      // alert(requestUrl);
        document.getElementById("divNews").style.display="inline";
		if(XmlHttpNewsGlobalHome)	{
					XmlHttpNewsGlobalHome.onreadystatechange = function(){getNewsRespGlobalPopUp()};
					XmlHttpNewsGlobalHome.open("GET", requestUrl,  true);
					XmlHttpNewsGlobalHome.send(null);
				}
    }
    
    function getNewsRespGlobalPopUp()
{

	if(XmlHttpNewsGlobalHome.readyState == 4)
	{
		// To make sure valid response is received from the server, 200 means response received is OK
		if(XmlHttpNewsGlobalHome.status == 200)//
		{
		
		document.getElementById("TdNews").innerHTML=XmlHttpNewsGlobalHome.responseText;
		document.body.style.cursor = "auto";		
		}
		else
		{
		
			document.getElementById("TdNews").innerHTML =  "There was a problem retrieving data from the server.";
			document.body.style.cursor = "auto";
		}
		
	}
}


function ShowHomeIndices(contiment,val)
{	
    NoDispalyIndices();
    document.getElementById("IndicesT"+val).className = "tabtextSel";
	var requestUrl = "AjaxInternationalIndices.aspx?id=&Contiment="+contiment;
	ajaxpage(1,requestUrl,'IndicesData');
}
function NoDispalyIndices()
{
for(var i=1;i<3;i++)
{
document.getElementById("IndicesT"+i).className = "tabtextUnSel";
}
}


  function GlobalQuotesFinder(FinCode,Option1,Option2)// To be used in inner pages for company navigations
{

window.location.href = "../companyprofile/QuoteFinder.html?id=65&FinCode="+FinCode+"&Mode=S";
}

