function Browser() {
  var ua, s, i;
  this.isIE    = false;
  this.isNS    = false;
  this.version = null;
  ua = navigator.userAgent;
  s = "MSIE";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  // Treat any other "Gecko" browser as NS 6.1.
  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }
}
var browser = new Browser();
var clockTimeoutID;
//Global Variables
var XmlHttp;
//Creating object of XMLHTTP For AJAX Method
function CreateXmlHttp()
	{ 
		//Creating object of XMLHTTP in IE
		try
		{
			XmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e)
		{
			try
			{
				XmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch(oc)
			{
				XmlHttp = null;	
			}
		}
		//Creating object of XMLHTTP in Mozilla and Safari 
		if(!XmlHttp && typeof XMLHttpRequest != "undefined") 
		{
			XmlHttp = new XMLHttpRequest();
		}
	}
	
	
	// Ticker  Strat

	function ExchngTimeClock(Exchg) {
	 var time = new Date()
	 var hour = time.getHours()
	 if (hour >= 10 && hour <= 20)
		  clockTimeoutID = setTimeout("getTickerData('"+ Exchg +"')",600000);
	}


function getTickerData(Exchg)
	{
	
	if (Exchg=="BSE")
	{
		
		document.getElementById("btnBSE").className="tickerBSEon"
		document.getElementById("btnNSE").className="tickerNSEoff"
		
	}
	else if(Exchg=="NSE")
	{
		document.getElementById("btnNSE").className="tickerNSEon"
		document.getElementById("btnBSE").className="tickerBSEoff"
		
	}
		CreateXmlHttp();
		document.body.style.cursor = "progress";
		document.getElementById("MarqueeId").innerHTML = " <img src='../imagesHome/loadingnew.gif'>";
		
		var requestUrl = "../TickerData.aspx?Exchg="+ Exchg +"&IpTrack="+ window.location.hostname +"&timeStamp="+new Date().getTime();
		if(XmlHttp)	{
					XmlHttp.onreadystatechange = function(){getDataResponse(Exchg);};
					XmlHttp.open("GET", requestUrl,  true);
					XmlHttp.send(null);
				}
	}
	
	//Called when response comes back from server Only For Ticker
function getDataResponse(Exchg)
{
	
	// To make sure receiving response data from server is completed
	if(XmlHttp.readyState == 4)
	{
		// To make sure valid response is received from the server, 200 means response received is OK
		if(XmlHttp.status == 200)
		{			
		
			
			var arrCol,Time,Code,CompName,ClPrice,DiffVal,DiffImg;
			var ExchgDet="",stkDet="";
			var MarqueeId = document.getElementById("MarqueeId");
			var Mq_Data = XmlHttp.responseText;
			
			if(Mq_Data != "")
			var arrRow = Mq_Data.split("|");
				for(i=0; i<arrRow.length-1; i++)
				 {
					arrCol = arrRow[i].split("~");
						CompName = arrCol[1];
						ClPrice  = arrCol[2];
						DiffVal  = arrCol[3];
						if(DiffVal>0) 
						{
							//DiffImg= "<img align='absmiddle' src='../images/arrow_green01.gif'>";
							clss = "<span class='TickerGreen'>"
						}
						else if(DiffVal<0) 
						{
							clss = "<span class='TickerRed'>"
							//DiffImg="<img align='absmiddle' src='../images/arrow_red01.gif'>";
						}
						else 
						{
							clss = "<span class='TickerBlue'>"
						//	DiffImg= "<img align='absmiddle' src='../images/eq.gif'>";						
						}
												if(i==0)ExchgDet = "<span class='TickerLink'>" + arrCol[0] +" &nbsp;&nbsp; "+ CompName +"&nbsp; "+ ClPrice+ clss +" (&nbsp;"  + DiffVal +")</span> </span>&nbsp;&nbsp;&nbsp;";else stkDet += "<span class='TickerLink'>" + "<a href='../Profiles/ProfileIndex.aspx?id=1&code=" + arrCol[0] + "'><span  class=TickerLink>" + CompName +"</span></a> "+"&nbsp;&nbsp;"+ ClPrice + clss +" (&nbsp;" + DiffVal +")</span>  &nbsp;</span>&nbsp;";						
				}
				if(browser.isIE)
					MarqueeId.innerHTML = "<marquee onmouseover='this.stop();' id='marq' onmouseout='this.start();' trueSpeed scrollAmount='2' scrollDelay='35' direction='left' loop='repeat' width='100%'>" + ExchgDet + stkDet + "</marquee>";
				else
					MarqueeId.innerHTML = ExchgDet + stkDet;				
				document.body.style.cursor = "auto";
				ExchngTimeClock(Exchg);
	
		}
		else
			MarqueeId.innerHTML = "<img src='../imagesHome/loadingnew.gif'>";
	}
}

function GetXmlHttpObject(handler)
{ 
var objXmlHttp=null
if (navigator.userAgent.indexOf("Opera")>=0)
{
alert("This example doesn't work in Opera") 
return 
}
if (navigator.userAgent.indexOf("MSIE")>=0)
{ 
var strName="Msxml2.XMLHTTP"
if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
{
strName="Microsoft.XMLHTTP"
} 
try
{ 
objXmlHttp=new ActiveXObject(strName)
objXmlHttp.onreadystatechange=handler 
return objXmlHttp
} 
catch(e)
{ 
alert("Error. Scripting for ActiveX might be disabled") 
return 
} 
} 
if (navigator.userAgent.indexOf("Mozilla")>=0)
{
objXmlHttp=new XMLHttpRequest()
objXmlHttp.onload=handler
objXmlHttp.onerror=handler 
return objXmlHttp
}
} 


 function HomeTicker(ex,typ)
{
if (ex == "")
{
	document.getElementById("Foff").src = "../images/futureoff.gif"
	document.getElementById("Son").src = "../images/SpotOff.gif"
	if (typ=="S")
	{
	document.getElementById("Son").src = "../images/SpotOn.gif"
	document.getElementById("SF").value = "S"
	document.getElementById("Son").className = "tickerOpton";
	document.getElementById("Foff").className = "tickerFutoff";
	}
	else
	{
	document.getElementById("Foff").src = "../images/FutureOn.gif"
	document.getElementById("Foff").className = "tickerFuton";
	document.getElementById("Son").className = "tickerOptoff";
	document.getElementById("SF").value = "F"
	}
}
else
{
	if(ex=="MCX")
	{

		document.getElementById("Ech").value = "MCX"
	}
	else
	{
	
		document.getElementById("Ech").value = "NCDEX"
	}
	
}
	var url="../tickerds.aspx?sid=" + Math.random() + "&Exchg="+document.getElementById("Ech").value+"&typ="+document.getElementById("SF").value
	xmlHttp1 = GetXmlHttpObject(ShowTickerData)
	xmlHttp1.open("GET", url , true)
	xmlHttp1.send(null)
}

function ShowTickerData() 
{ 
	if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete")
	{ 
		document.getElementById("CommTicker1_Tik").innerHTML=xmlHttp1.responseText 
	} 
	else
	{
		document.getElementById("CommTicker1_Tik").innerHTML = "<img src=../imagesHome/loadingnew.gif>";
	}
} 
function LookUpData(str,typ)
{ 
if (str=="NCDEX")
{

	document.getElementById("RowNCDEXOn").style.display="inline";
	document.getElementById("RowMCXOn").style.display="none";
	
	document.getElementById("MCXGL").style.display="none";
	document.getElementById("MCXHL").style.display="none";
	document.getElementById("NCDXHL").style.display="inline";
	document.getElementById("NCDXGL").style.display="inline";
	HomeTicker('NCDEX','S');
}
else
{

	document.getElementById("RowNCDEXOn").style.display="none";
	document.getElementById("RowMCXOn").style.display="inline";
	
	document.getElementById("MCXGL").style.display="inline";
	document.getElementById("NCDXGL").style.display="none";
	document.getElementById("MCXHL").style.display="inline";
	document.getElementById("NCDXHL").style.display="none";
	
	HomeTicker('MCX','S');
}
	/*var url="LookUpData.aspx?sid=" + Math.random() + "&Exchg=" + str
	xmlHttp=GetXmlHttpObject(LoadData)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)*/
} 

function LoadData() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
	document.getElementById("LookUpTd").innerHTML=xmlHttp.responseText 
	
} 
else
{
	document.getElementById("LookUpTd").innerHTML = "<img src=../imagesHome/loadingnew.gif>";
}

} 
//for Derivative GetQuotes----



//Global Variables
var XmlHttp;
var XmlHttpFO;
//Creating object of XMLHTTP For AJAX Method
function CreateXmlHttpNew()
	{
		//Creating object of XMLHTTP in IE
		try
		{
			XmlHttpFO = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e)
		{
			try
			{
				XmlHttpFO = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch(oc)
			{
				XmlHttpFO = null;	
			}
		}
		//Creating object of XMLHTTP in Mozilla and Safari 
		if(!XmlHttpFO && typeof XMLHttpRequest != "undefined") 
		{
			XmlHttpFO = new XMLHttpRequest();
		}
	}
	
 function Get_Symbol(instStr)
 { 
		
 		var InstName =instStr;
 		var Symbol = document.getElementById("Symbol");
 		var OptionType = document.getElementById("OptionType");
 		var StrikePrice = document.getElementById("StrikePrice"); 		
 		
			if(InstName.value=="OPTIDX")
			{
				OptionType.options[1] = new Option();
				OptionType.options[1].value="PE";
				OptionType.options[1].text="PE";
				OptionType.options[2] = new Option();
				OptionType.options[2].value="CE";
				OptionType.options[2].text="CE";
			}
			else if(InstName.value=="OPTSTK")
			{
				OptionType.options[1] = new Option();
				OptionType.options[1].value="PA";
				OptionType.options[1].text="PA";
				OptionType.options[2] = new Option();
				OptionType.options[2].value="CA";
				OptionType.options[2].text="CA";
			}
			else
			{
				OptionType.length = 0;
				OptionType.options[0] = new Option();
				OptionType.options[0].value="";
				OptionType.options[0].text="Select Option Type";
				
				StrikePrice.length = 0;
				StrikePrice.options[0] = new Option();
				StrikePrice.options[0].value="";
				StrikePrice.options[0].text="Select Price";
			}
			
		CreateXmlHttpNew();
		document.body.style.cursor = "progress";
		var requestUrl = "FO_Symbol.aspx?timeStamp="+ new Date().getTime() +"&InstName="+InstName.value;
		
		if(XmlHttpFO)	{
					XmlHttpFO.onreadystatechange = function(){getSymbolResp(Symbol)};
					XmlHttpFO.open("GET", requestUrl,  true);
					XmlHttpFO.send(null);
				}
		
 }
 
  function Get_ExpDate(instStr)
 { 		
 		
 		var InstName =instStr; //document.getElementById("Quotes_InstrumentType");
 		var Symbol = document.getElementById("Symbol");
 		var ExpiryDate = document.getElementById("ExpiryDate"); 	
 		
 		Symbol=Symbol.value;
 		Symbol=Symbol.replace("&","*");
 			
		CreateXmlHttpNew();
		document.body.style.cursor = "progress";
		var requestUrl = "FO_ExpDate.aspx?timeStamp="+ new Date().getTime() +"&InstName="+InstName.value +"&Symbol="+Symbol;
	
		//alert(requestUrl)
		if(XmlHttpFO)	{
					XmlHttpFO.onreadystatechange = function(){getDateResp(ExpiryDate)};
					XmlHttpFO.open("GET", requestUrl,  true);
					XmlHttpFO.send(null);
				}
		
 }
 function Get_StrikePrice(instStr)
 { 		
 		var InstName = instStr;//document.getElementById("Quotes_InstrumentType");
 		var Symbol = document.getElementById("Symbol");
 		var ExpiryDate = document.getElementById("ExpiryDate");
 		var OptionType = document.getElementById("OptionType");
 		var StrikePrice = document.getElementById("StrikePrice"); 
 		
 		Symbol=Symbol.value;
 		Symbol=Symbol.replace("&","*");
 		
 		//alert(ExpiryDate.value)		
		CreateXmlHttpNew();
		document.body.style.cursor = "progress";
		var requestUrl = "Strike_Price.aspx?timeStamp="+ new Date().getTime() +"&InstName="+InstName.value +"&Symbol="+Symbol+"&ExpDate="+ExpiryDate.value+"&OptionType="+OptionType.value;
	
		
		if(XmlHttpFO)	{
					XmlHttpFO.onreadystatechange = function(){Get_StrikePriceResp(StrikePrice)};
					XmlHttpFO.open("GET", requestUrl,  true);
					XmlHttpFO.send(null);
				}
				
		
 }
 //Called when response comes back from server Only For Strike Price
function Get_StrikePriceResp(ig_)
{
	// To make sure receiving response data from server is completed
	if(XmlHttpFO.readyState == 4)
	{
	//alert(XmlHttpFO.status)
		// To make sure valid response is received from the server, 200 means response received is OK
		if(XmlHttpFO.status == 200)
		{
			
			//alert(ig_)
			//var availSchemes   = document.getElementById(ig_);
			var strData = XmlHttpFO.responseText;
			//alert(strData)
			if(strData != "") {	
			    
				var arrPrice = strData.split("|");
				ig_.length = 0; 	
				
				for(i=0; i<arrPrice.length-1; i++) {	
								
					var strPrice = arrPrice[i];
					var arrPriceCode = strPrice.split("~");
					
					ig_.options[i] = new Option();
					
					ig_.options[i].value = arrPriceCode[0];
					ig_.options[i].text = arrPriceCode[1];
				}
				
			}
			else {
					ig_.length = 0;
					ig_.options[0] = new Option(); 
					ig_.options[0].value = "";
					ig_.options[0].text = "Price not available";			
			}
			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";		
		}
	}
}
 
 
 
 
 //Called when response comes back from server Only For Symbol
function getSymbolResp(ig_)
{
	// To make sure receiving response data from server is completed
	if(XmlHttpFO.readyState == 4)
	{		
		// To make sure valid response is received from the server, 200 means response received is OK
		if(XmlHttpFO.status == 200)
		{				
			//alert(ig_)
			//var availSchemes   = document.getElementById(ig_);
			var strData = XmlHttpFO.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 = "Symbol not available";			
			}
			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";		
		}
	}
}

 //Called when response comes back from server Only For Symbol
/*function getDateResp(ig_)
{

	// To make sure receiving response data from server is completed
	if(XmlHttpFO.readyState == 4)
	{
		// To make sure valid response is received from the server, 200 means response received is OK
		if(XmlHttpFO.status == 200)
		{			
			//alert(ig_)
			//var availSchemes   = document.getElementById(ig_);
			var strData = XmlHttpFO.responseText
			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 = "Date not available";			
			}
			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 ValidateForm()
{   
  
	var InstType = document.getElementById("Quotes_InstrumentType");
	var Symbol   = document.getElementById("Symbol");
	var ExpDate  = document.getElementById("ExpiryDate");
	var OptType  = document.getElementById("OptionType");
	var StkPrice = document.getElementById("StrikePrice"); 
		
		Symbol=Symbol.value;
 		Symbol=Symbol.replace("&","*");
 		
		if(InstType.value=="")
		{
			alert("Please select the Instrument Type before you proceed")
			return false;
		}
		else if((InstType.value=="OPTIDX")||(InstType.value=="OPTSTK"))
		{
			if(Symbol=="Select Symbol")	
			{
			alert("Please select Symbol before you proceed")
			return false;
			}
			else if(OptType.value=="")
			{
			alert("Please select Option Type before you proceed")
			return false;
			}
			else if(StkPrice.value=="Select Price")
			{
			alert("Please select Price before you proceed")
			return false;
			}
		}
		else 
		{
			if(Symbol=="Select Symbol")	
			{
			alert("Please select Symbol before you proceed")
			return false;
			}
		}
		var url="InstType="+InstType.value+"&Symbol="+Symbol+"&ExpDate="+ExpDate.value+"&OptType="+OptType.value+"&StkPrice="+StkPrice.value+"";
		getFOQuotes(url);
}

//For Loading Data from FOQuotesData.aspx Using AJAX
function getFOQuotes(strUrl)
	{
		var FOQuotesTbl = document.getElementById("FOQuotesTbl");
		if(FOQuotesTbl.style.display=="none")FOQuotesTbl.style.display = "inline";
		document.FOPChartImg.src="FOpriceChart.aspx?"+ strUrl;
		document.getElementById("LoadingID").src = "../images/loading1.gif";

		CreateXmlHttp();
		document.body.style.cursor = "progress";
		var requestUrl = "FOQuotesData.aspx?IpTrack="+ window.location.hostname +"&timeStamp="+ new Date().getTime() +"&"+ strUrl;
		
		
		if(XmlHttp)	{
					XmlHttp.onreadystatechange = function(){getFODataResp()};
					XmlHttp.open("GET", requestUrl,  true);
					XmlHttp.send(null);
				}
	}
	
//Called when response comes back from server Only For FO Quotes Data Response
function getFODataResp()
{
	// To make sure receiving response data from server is completed
	if(XmlHttp.readyState == 4)
	{
		// To make sure valid response is received from the server, 200 means response received is OK
		if(XmlHttp.status == 200)
		{
			var FO_QuoteData = XmlHttp.responseText;
			if(FO_QuoteData != "") {
				var arrRow = FO_QuoteData.split("|");
				for(i=0; i<arrRow.length-1; i++)
				 {
					if((i!='14')&&(i!='15'))
						document.getElementById("FO"+i).innerHTML = arrRow[i];
				 }
				document.getElementById("LoadingID").src = "../images/shadw.gif";
				document.body.style.cursor = "auto";
			}	
		}
		else
			document.getElementById("LoadingID").src = "../images/loading1.gif";
			document.getElementById("LoadingID").innerHTML = "<img src='../CommonImgs/loading1.gif'>";
	}
}

function redUrl_FandO(ig_,ig_a,ig_b)
	{
	
			var in_="",s_="";
			var qr_Str = ig_a.split("|");
			in_ = "&InstName="+ qr_Str[0]
			if(qr_Str.length==2)
				s_ = "&Symbol="+ qr_Str[1]
			document.location = ig_+ig_b+in_+s_;
	}

function OptChange_FandO(ig_,ig_a)
	{
			var Index = document.getElementById(ig_);
			Index.length = 0;
			for(var i=0; i < arrFAO.length; i++)
			{
				Index.options[i] = new Option(); 
				Index.options[i].value = arrFAOCode[i];
				Index.options[i].text = arrFAO[i];
				if(ig_a==arrFAOCode[i])
					Index.options[i].selected = true;
			}
}
var arrFAO		=  new Array('ALL Contracts','ALL Futures','ALL Options','NIFTY Futures','NIFTY Options','BANKNIFTY Futures','BANKNIFTY Options','CNXIT Futures','CNXIT Options','STOCK Futures','STOCK Options');
var arrFAOCode	=  new Array('','FUT','OPT','FUTIDX|NIFTY','OPTIDX|NIFTY','FUTIDX|BANKNIFTY','OPTIDX|BANKNIFTY','FUTIDX|CNXIT','OPTIDX|CNXIT','FUTSTK','OPTSTK');


//end of Derivative GetQuotes

function FUTOPTTab(VAL)
{ 
	if (VAL=="Future")
	{
		document.getElementById("RowFutOn").style.display="inline";
		document.getElementById("RowOptOn").style.display="none";
		document.getElementById("Future").style.display="inline";
		document.getElementById("Option").style.display="none";
		document.getElementById("FutureG").style.display="inline";
		document.getElementById("OptionG").style.display="none";
		
	}
	else
	{
		document.getElementById("RowFutOn").style.display="none";
		document.getElementById("RowOptOn").style.display="inline";
		document.getElementById("Future").style.display="none";
		document.getElementById("Option").style.display="inline";
		document.getElementById("FutureG").style.display="none";
		document.getElementById("OptionG").style.display="inline";
		
	}
	}
	function EnterScript(e,id)
	{
		if(e.keyCode==13)	
		{
			var Scripid = document.getElementById(id);
			var boolval = SearchQuote1();
			if(boolval)
			return true;
			else
			return false;
		}
	}
	
	function fill()
	{
		var getquote=document.getElementById("txt_quote").value;
		if (getquote=="")
		{
			document.getElementById("txt_quote").value="Enter Company Name";
		}
	}
	
	function empty()
	{
		if (document.getElementById("txt_quote").value=="Enter Company Name")
		{
  			document.getElementById("txt_quote").value="";
		}
	}
		
	function SearchQuote1(opt)
		{
			var SrchQuote = document.getElementById('txt_quote').value;
			var PageId = document.getElementById('DD_Options').value;					
			var strReplaceAll =SrchQuote;
			var intIndexOfMatch = strReplaceAll.indexOf( "'" );
			while (intIndexOfMatch != -1)
			{
				strReplaceAll = strReplaceAll.replace( "'", "" )
				intIndexOfMatch = strReplaceAll.indexOf( "'" );
				
			}
			var StrUrl = "../Profiles/CompanySearch.aspx?schtxt="+strReplaceAll+"&id="+PageId;
			
			if(SrchQuote =="" || SrchQuote=="Enter Company Name")
			{
				alert("Please enter company name ..!!!");
				return false;
			}
			else 
			{
				window.location=StrUrl;
			}								
		}
//end of getquotes----

//IPO//
function ShowA2Z(redUrl_,Index)
 {
 	var A2ZIndexId = document.getElementById("A2ZTd");
	if(A2ZIndexId.innerHTML=="")
	{
		var A2Z="";A2ZClass ="";
			for(i=65; i<=90; i++)				
			{
				var Alpha = String.fromCharCode(i);
				A2ZClass = (Index==Alpha) ? "IndexLinkSel" : "IndexLink";
				A2Z += "<a href='"+redUrl_+"&Index="+ Alpha +"' class="+ A2ZClass+ ">"+ Alpha +"</a> <span class='Divider'>  </span>";
			}
			A2ZClass = (Index=="0-9") ? "IndexLinkSel" : "IndexLink";	
			A2ZIndexId.innerHTML = A2Z + "<a href='"+redUrl_+"&Index=0-9' class="+ A2ZClass +">0-9</a><span class='Divider'>  </span>";
	}
	else
		A2ZIndexId.innerHTML = "";			
}	

//For Home News
function HomeNews(newsid)
{
	if(newsid=='LN')
	{
		document.getElementById("TblMCNews").style.display="none";
		document.getElementById("TblLiveNews").style.display="inline";
	}
	else
	{
		document.getElementById("TblMCNews").style.display="inline";
		document.getElementById("TblLiveNews").style.display="none";
	}
}

//News Details
function NewsPopUp(sno,secid,subsecid,id)
{
 var fileName="../NewsDetails.aspx?sno="+sno+"&secid="+secid+"&subsecid="+subsecid+"&id="+id;
 var newWin=window.open(fileName,'win1','x=0,y=0,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,width=515,height=415,screenX=0,screenY=0,left=200,top=230');//280
 newWin.focus();
}

function PopUp(url)
{			
	var newPop=window.open(url,'win2','x=0,y=0,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,width=530,height=430,screenX=0,screenY=0,left=200,top=230');//280
	newPop.focus();
}		
		
		
//AttachTicker
function AttachTicker()
{	
	 window.opener.document.getElementById("trTickers").style.display="inline";
	 self.close();
}

//DetachTicker
function DetachTicker()
{	
	 document.getElementById("trTickers").style.display="none";
	 var newWin=window.open("AtachTicker.aspx",'gopi','x=0,y=0,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=0,copyhistory=no,width=930,height=110,screenX=0,screenY=0,left=50,top=50');	
	 newWin.focus();	 
}		
