/*Gopal : add  on 07 Sep 06 */
//for inner page
function Story(id,sno,secid,subsecid)
{	
	fileName = "NewsDetails.asp?id="+id+"&sno="+ sno+"&secid="+ secid+"&subsecid="+ subsecid;
     var w1=screen.width;
 	 w1-=300;
 	 var h1=screen.height;
 	 h1-=200;
	 var newWin=window.open(fileName,'gopi','x=0,y=0,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=0,copyhistory=no,width=560,height=400,screenX=0,screenY=0,left=210,top=200');	
	 newWin.focus();	 
}


//AttachTicker
function AttachTicker()
{	
	 window.opener.document.getElementById("DetachTbl").style.display="inline";
	 self.close();
}

//DetachTicker
function DetachTicker()
{	
	 document.getElementById("DetachTbl").style.display="none";
	 var newWin=window.open("TickerDetach.asp",'gopi','x=0,y=0,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=0,copyhistory=no,width=800,height=100,screenX=0,screenY=0,left=50,top=50');	
	 newWin.focus();	 
}

//For BSE NSE Ticker
function setTicker(option)
{
	//var bsenseimg = document.getElementById("bsenseimg")
	if (option=='N')
	{
	//bsenseimg.src="images/nseBse.GIF";
	document.getElementById("nTickerTbl").style.display="inline";
	document.getElementById("bTickerTbl").style.display="none";
	//document.getElementById("nsemarquee").reload();
	}
	else
	{
	//bsenseimg.src="images/Bsense.GIF";
	document.getElementById("nTickerTbl").style.display="none";
	document.getElementById("bTickerTbl").style.display="inline";
	//document.getElementById("bsemarquee").reload();				
	}
}

// For change the BSE , NSE Charts
function ShowExchChart(strVal)
{
 var strVal;
   if(strVal=='BSE'){
 		imgBSEChart.src = "http://moneysukh.com/images/BSEhomeOff.gif";
		imgNSEChart.src = "http://moneysukh.com/images/NSEhomeOn.gif"
		document.getElementById("BSE_Chart").style.display = "inline";
		document.getElementById("NSE_Chart").style.display = "none";
		document.getElementById("BSE_Prices").style.display = "inline";
		document.getElementById("NSE_Prices").style.display = "none";
	}
   else if(strVal=='NSE') {
 		imgBSEChart.src = "http://moneysukh.com/images/BSEhomeOn.gif";
		imgNSEChart.src = "http://moneysukh.com/images/NSEhomeOff.gif"
		document.getElementById("BSE_Chart").style.display = "none";
		document.getElementById("NSE_Chart").style.display = "inline";
		document.getElementById("BSE_Prices").style.display = "none";
		document.getElementById("NSE_Prices").style.display = "inline";
	}	
}

//To Show Market News
function showMarkNews(strVal)
{
    var strVal;
	var HotP = document.getElementById("TblHot")
	var Econ = document.getElementById("TblEco")
	var CorpNews = document.getElementById("TblCorp")
	var StkAlert = document.getElementById("TblStk")
	switch(strVal)
	{
		case 'H' :
			HotP.style.display = "inline";
			Econ.style.display = "none";
			CorpNews.style.display = "none";
			StkAlert.style.display = "none";
			break;
		case 'E' :
			HotP.style.display = "none";
			Econ.style.display = "inline";
			CorpNews.style.display = "none";
			StkAlert.style.display = "none";			
			break;
		case 'C' :
			HotP.style.display = "none";
			Econ.style.display = "none";
			CorpNews.style.display = "inline";
			StkAlert.style.display = "none";
			break;
		case 'S' :
			HotP.style.display = "none";
			Econ.style.display = "none";
			CorpNews.style.display = "none";
			StkAlert.style.display = "inline";			
			break;
	}
}

//To Show Market Commentary Session's
function showMarkComm(strVal)
{
    var strVal;
	var PreSes = document.getElementById("TblPre")
	var MidSes = document.getElementById("TblMid")
	var QuickSes = document.getElementById("TblQuick")
	var EndSes = document.getElementById("TblEnd")
	switch(strVal)
	{
		case 'P' :
			PreSes.style.display = "inline";
			MidSes.style.display = "none";
			QuickSes.style.display = "none";
			EndSes.style.display = "none";
			break;
		case 'M' :
			PreSes.style.display = "none";
			MidSes.style.display = "inline";
			QuickSes.style.display = "none";
			EndSes.style.display = "none";			
			break;
		case 'Q' :
			PreSes.style.display = "none";
			MidSes.style.display = "none";
			QuickSes.style.display = "inline";
			EndSes.style.display = "none";
			break;
		case 'E' :
			PreSes.style.display = "none";
			MidSes.style.display = "none";
			QuickSes.style.display = "none";
			EndSes.style.display = "inline";			
			break;
	}
}
/*End : Gopal : add  on 29 Aug 06 */


function mouseOver(){document.a.src="http://moneysukh.com/images/DepositoryOn.gif"} function mouseOut(){document.a.src="http://moneysukh.com/images/Depository.gif"};
function mouseOver1(){document.b.src="http://moneysukh.com/images/TradeonOn.gif"}function mouseOut1(){document.b.src="http://moneysukh.com/images/Tradeon.gif"};
function mouseOver2(){document.c.src="http://moneysukh.com/images/BackOfficeOn.gif"}function mouseOut2(){document.c.src="http://moneysukh.com/images/BackOffice.gif"};
function mouseOvera(){document.a1.src="http://moneysukh.com/images/Services1On.gif"}function mouseOuta(){document.a1.src="http://moneysukh.com/images/Services1.gif"};
function mouseOvera1(){document.a2.src="http://moneysukh.com/images/Home1On.gif"}function mouseOuta1(){document.a2.src="http://moneysukh.com/images/Home1.gif"};
function mouseOvera2(){document.a3.src="http://moneysukh.com/images/EmailOn.gif"}function mouseOuta2(){document.a3.src="http://moneysukh.com/images/Email.gif"};

function mouseOverm1(){document.n1.src="http://moneysukh.com/images/HotStockOn.gif"}function mouseOutm1(){document.n1.src="http://moneysukh.com/images/HotStock.gif"};
function mouseOverm2(){document.n2.src="http://moneysukh.com/images/EconomyOn.gif"}function mouseOutm2(){document.n2.src="http://moneysukh.com/images/Economy.gif"};
function mouseOverm3(){document.n3.src="http://moneysukh.com/images/CorporateOn.gif"}function mouseOutm3(){document.n3.src="http://moneysukh.com/images/Corporate.gif"};
function mouseOverm4(){document.n4.src="http://moneysukh.com/images/StockAleartOn.gif"}function mouseOutm4(){document.n4.src="http://moneysukh.com/images/StockAleart.gif"};

function mouseOvers1(){document.CO1.src="http://moneysukh.com/images/PresessionOn.gif"}function mouseOuts1(){document.CO1.src="http://moneysukh.com/images/Presession.gif"};
function mouseOvers2(){document.CO2.src="http://moneysukh.com/images/MidsessionOn.gif"}function mouseOuts2(){document.CO2.src="http://moneysukh.com/images/Midsession.gif"};
function mouseOvers3(){document.CO3.src="http://moneysukh.com/images/QueckreviewOn.gif"}function mouseOuts3(){document.CO3.src="http://moneysukh.com/images/Queckreview.gif"};
function mouseOvers4(){document.CO4.src="http://moneysukh.com/images/EndsessionOn.gif"}function mouseOuts4(){document.CO4.src="http://moneysukh.com/images/Endsession.gif"};


/*functions for mutual*/
function winnav(r1,r2,r3)	
{
    location.href="MF_Profile.asp?a=4&tab=3&showpage="+ r1 + "&schcode=" + r2 + "&coname=" + r3+"";
}
function pop6(r1,r2,r3)
{
	location.href="MF_Profile.asp?a=4&tab=4&showpage="+ r1 + "&schcode=" + r2 + "&coname=" + r3+"";
}
function pop3(r1,r2,r3)
{
	location.href="MF_Profile.asp?a=4&tab=6&showpage="+ r1 + "&schcode=" + r2 + "&coname=" + r3+"";
}
function pop4(r1,r2,r3)
{	 
 location.href="MF_Profile.asp?a=4&tab=5&showpage="+ r1 + "&schcode=" + r2 + "&coname=" + r3+"";
}	
function checkmfquote()
{
	var getquote = document.GetQuoteFrm.cmpalpha.value;
	if (getquote=="")
	{
		alert('Please enter few Characters');
		document.GetQuoteFrm.cmpalpha.focus();
		window.status='Please enter first few Characters of a company';
		return false;
	}	
	document.GetQuoteFrm.submit()
}

function detailsNews(sno,secid,subsecid)
{	
	fileName = "NewsDetails.asp?srno="+ sno+"&secid="+ secid+"&subsecid="+ subsecid;
     var wid=screen.width;
 	 wid-=300;
 	 var hig=screen.height;
 	 hig-=200;
	 var newWin=window.open(fileName,'gopi','x=0,y=0,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=1,copyhistory=no,width=580,height=350,screenX=0,screenY=0,left=210,top=200');	 	
	 newWin.focus();
}
// JScript source code

			//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();
					}
				}


	function getScheme(typ)
	{
		//alert(document.getElementById("fund").value);
		//alert(typ)
		/*
		if (typ == 'fund')
		{
			cocode = document.getElementById("fund").value;
		}
		else
		{
			cocode = document.getElementById("cat").value;
		
		}
		*/
		fund = document.getElementById("fund").value;
		category = document.getElementById("cat").value;
		scheme = document.getElementById("sch").value;
			CreateXmlHttp();
			var requestUrl = "scheme.asp?fund="+fund+"&category="+category;
			//alert(requestUrl)
			if(XmlHttp)	
			{
				XmlHttp.onreadystatechange = getSchDataResponse;
				XmlHttp.open("GET", requestUrl,  true);
				XmlHttp.send(null);		
			}
			
	}
	
	
	function getSchDataResponse()
				{
					// 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 strData = XmlHttp.responseText
							//alert(strData)
							//addData("s1",strdata)
							var dropDown = document.getElementById("sch");
							dropDown.length = 0;
							var tdata = strData.split("|");
							for(i=0; i<tdata.length; i++)
							{	
								var temp1 = tdata[i].split("~");
								dropDown.options[i] = new Option(); 
								dropDown.options[i].value = temp1[1];
								dropDown.options[i].text = temp1[0];
							}
						}
					}		
			}	
			
			
	

function popAMC(r1,mnuOpt)
	{
		location.href="Mf_AmcDet.asp?mnuOpt="+ mnuOpt +"&tmnu=3&tab=1&mutcode="+ r1 + "";		
	}
	
function popaddress(r1,r2,r3,mnuOpt)
	{
		location.href="Mf_AmcDet.asp?mnuOpt="+ mnuOpt +"&tmnu=3&tab=2&addressdet="+ r1 + "&mutcode=" + r2 + "&amcname=" + escape(r3)+"";
	} 
function popMfOffer(r1,mnuOpt)
	{
		location.href="mf_offer.asp?mnuOpt="+ mnuOpt +"&tmnu=3&tab=3&mutcode="+ r1 + "";			
	}
	
function popkeyPersonal(r1,r2,r3,mnuOpt)
	{
		location.href="Mf_AmcDet.asp?mnuOpt="+ mnuOpt +"&tmnu=3&tab=4&keypersonal="+ r1 + "&mutcode=" + r2 + "&amcname=" + escape(r3)+"";
	}
	
	
	<!--Add by Gopal For Futures & Commodities -->
function ChangeComp(opt){
	if(opt !='')
	{
	var objRS = RSGetASPObject("GetSymbol.asp"); 
	var objResult = objRS.fillsymbol(opt); 
	var strNames = objResult.return_value; 
	document.getq_form.Symbol.length=0;
	if(strNames != "undefined")
	{	
		document.getq_form.Symbol.options[0] = new Option(); 
		document.getq_form.Symbol.options[0].value='';
		document.getq_form.Symbol.options[0].text='Select symbol Type';
			
		var arrCatNames = strNames.split("|"); 	
		for(i=0; i<arrCatNames.length-1; i++)
		{	
			var strid=arrCatNames[i];
			document.getq_form.Symbol.options[i+1] = new Option(); 
			document.getq_form.Symbol.options[i+1].value=strid;
			document.getq_form.Symbol.options[i+1].text=strid;
		}
	}
	}	
}



	 //This Function ..required for showing Expiry Date
 	// invoke the server side program.... only for the selection of symbol
    // wrong combinations will not fill the strike price
function ChangeExpDate(sym){
	var opt=document.getq_form.InstType[document.getq_form.InstType.selectedIndex].value;
	if(opt !='' && sym != '')
	{
	var objRS = RSGetASPObject("GetExpDate.asp"); 
	var objResult = objRS.fillexpdate(sym); 
	var strNames = objResult.return_value; 
	document.getq_form.ExpDate.length=0;
	if(strNames != "undefined")
	{	
		document.getq_form.ExpDate.options[0] = new Option(); 
		document.getq_form.ExpDate.options[0].value='';
		document.getq_form.ExpDate.options[0].text='Select Expiry Date';
		var arrCatNames = strNames.split("|"); 
			
		for(i=0; i<arrCatNames.length-1; i++)
		{	
			var strid=arrCatNames[i];
			document.getq_form.ExpDate.options[i+1] = new Option(); 
			document.getq_form.ExpDate.options[i+1].value=strid;
			document.getq_form.ExpDate.options[i+1].text=strid;
		}
	}
	}	
}

	 //This Function ..required for showing Option Types
 	// This Function invokes  only the combinations (InstName = OPTIDX or  InstName = OPTSTK ) it shows the table id named "OptTable"
	// if the instname equals OPTIDX then opttype is PE or CE Else OptType is PA or CA
    // wrong combinations will not shows the table			
function ShowTypes(opt){
	if(opt=='OPTIDX' || opt=='OPTSTK')
	{
		OptTable.style.display='inline';
			if(opt =='OPTIDX')
			{
					document.getq_form.OptType.length=3;
					document.getq_form.OptType.options[0].value="";
					document.getq_form.OptType.options[0].text='Select Option Type';
					document.getq_form.OptType.options[1].value='PE';
					document.getq_form.OptType.options[1].text='PE';
					document.getq_form.OptType.options[2].value='CE';
					document.getq_form.OptType.options[2].text='CE';					
			 }	
			 else
			 {
					document.getq_form.OptType.length=3;
					document.getq_form.OptType.options[0].value="";
					document.getq_form.OptType.options[0].text='Select Option Type';
					document.getq_form.OptType.options[1].value='PA';
					document.getq_form.OptType.options[1].text='PA';
					document.getq_form.OptType.options[2].value='CA';
					document.getq_form.OptType.options[2].text='CA';			 
			 }
	 }
	 else
	 {
		OptTable.style.display='none';
	 }	
}

	 //This Function ..required for showing Strike Prices
 	// invoke the server side program.... only the combinations (InstName, Symbol, ExpDate, OptType) not equal to space 
    // wrong combinations will not fill the strike price
function ShowStrikes(){
	var OptType = document.getq_form.OptType[document.getq_form.OptType.selectedIndex].value;
	var InstName = document.getq_form.InstType[document.getq_form.InstType.selectedIndex].value;
	var Symbol = document.getq_form.Symbol[document.getq_form.Symbol.selectedIndex].value;
	var ExpDate = document.getq_form.ExpDate[document.getq_form.ExpDate.selectedIndex].value;
	if(InstName != '' && Symbol !='' && ExpDate != '' && OptType !='')
	{
		var OptStr = InstName +"|"+ Symbol +"|"+ ExpDate +"|"+ OptType
		var objRS = RSGetASPObject("GetStkPrice.asp"); 
		var objResult = objRS.fillstkprice(OptStr); 
		var strNames = objResult.return_value; 
		document.getq_form.StkPrice.length=0;
		if(strNames != "undefined")
		{	
			document.getq_form.StkPrice.options[0] = new Option(); 
			document.getq_form.StkPrice.options[0].value="";
			document.getq_form.StkPrice.options[0].text='Select Stroke Price';
			
			var arrCatNames = strNames.split("|"); 	
			for(i=0; i<arrCatNames.length-1; i++)
			{	
				var strid=arrCatNames[i];
				document.getq_form.StkPrice.options[i+1] = new Option(); 
				document.getq_form.StkPrice.options[i+1].value=strid;
				document.getq_form.StkPrice.options[i+1].text=strid;
			}
		}
	}
}
		 //final check ..required since any change during final submission will
		// unnecessarily invoke the server side program.... only the combinations
		// wrong combinations will shows the alert message
	
//For New Visitor Pages by vinod
function SubmitME() {		
	   var checkOK = "0123456789.";	  	  	  	
	   var str1=frmNewVisitor.Email.value;
	   var filter1=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/

	if(document.frmNewVisitor.Name.value == false) 
	{	alert("Enter Name")
		document.frmNewVisitor.Name.focus();
		return false;
	}	

	 if(document.frmNewVisitor.add.value == false) 
	{	alert("Enter  Address")
		document.frmNewVisitor.add.focus();
		return false;
	}
	
	if(document.frmNewVisitor.Pin.value == false) 
	{	alert("Enter Pincode No.")
		document.frmNewVisitor.Pin.focus();
		return false;
	}
	
	var checkStr_age = frmNewVisitor.Pin.value;
	  var allValid = true;
		for (i = 0;  i < checkStr_age.length;  i++)
		{
		  ch = checkStr_age.charAt(i);
		  for (j = 0;  j < checkOK.length;  j++)
		    if (ch == checkOK.charAt(j))
		      break;
		  if (j == checkOK.length)
		  {
		    allValid = false;
		    break;
		  }
		}
		if (!allValid)
		{
		  alert("Please enter only Digit in the \"PinCode Number\" field.");
		  frmNewVisitor.Pin.value="";
		  frmNewVisitor.Pin.focus();
		  return (false);
		} 
  if(document.frmNewVisitor.Email.value == false) 
	{	alert("Enter  Email Address ")
		document.frmNewVisitor.Email.focus();
		return false;
	}
	
	if (!filter1.test(str1))
	{  
			alert("Invalid E-mail Address! Please re-enter.");
			document.frmNewVisitor.Email.focus();
			return (false);
	}
	if(document.frmNewVisitor.Std.value == false) 
	{	alert("Enter Std Code")
		document.frmNewVisitor.Std.focus();
		return false;
	}
	
	var checkStr_age = frmNewVisitor.Std.value;
	  var allValid = true;
		for (i = 0;  i < checkStr_age.length;  i++)
		{
		  ch = checkStr_age.charAt(i);
		  for (j = 0;  j < checkOK.length;  j++)
		    if (ch == checkOK.charAt(j))
		      break;
		  if (j == checkOK.length)
		  {
		    allValid = false;
		    break;
		  }
		}
		if (!allValid)
		{
		  alert("Please enter only Digit in the \"Std Code\" field.");
		  frmNewVisitor.Std.value="";
		  frmNewVisitor.Std.focus();
		  return (false);
		} 
		
	if(document.frmNewVisitor.Phone.value == false) 
	{	alert("Enter Telephone No.")
		document.frmNewVisitor.Phone.focus();
		return false;
	}
	  var checkStr_age = frmNewVisitor.Phone.value;
	  var allValid = true;
		for (i = 0;  i < checkStr_age.length;  i++)
		{
		  ch = checkStr_age.charAt(i);
		  for (j = 0;  j < checkOK.length;  j++)
		    if (ch == checkOK.charAt(j))
		      break;
		  if (j == checkOK.length)
		  {
		    allValid = false;
		    break;
		  }
		}
		if (!allValid)
		{
		  alert("Please enter only Digit in the \"Telephone Number\" field.");
		  frmNewVisitor.Phone.value="";
		  frmNewVisitor.Phone.focus();
		  return (false);
		} 
   if(document.frmNewVisitor.Mobile.value == false) 
	{	alert("Enter  Mobile No")
		document.frmNewVisitor.Mobile.focus();
		return false;
	}
	
	var checkStr_age = frmNewVisitor.Mobile.value;
	  var allValid = true;
		for (i = 0;  i < checkStr_age.length;  i++)
		{
		  ch = checkStr_age.charAt(i);
		  for (j = 0;  j < checkOK.length;  j++)
		    if (ch == checkOK.charAt(j))
		      break;
		  if (j == checkOK.length)
		  {
		    allValid = false;
		    break;
		  }
		}
		if (!allValid)
		{
		  alert("Please enter only Digit in the \"Mobile Number\" field.");
		  frmNewVisitor.Mobile.value="";
		  frmNewVisitor.Mobile.focus();
		  return (false);
   } 
	
    if(document.frmNewVisitor.NBranch.value == false) 
	{	alert("Enter  Nearest Branch Name")
		document.frmNewVisitor.NBranch.focus();
		return false;
	}
  
	 document.frmNewVisitor.submit();     
	 //document.frmNewVisitor.action="AllTrans.asp"
	 return true;
}	
function resetMe()
{
document.frmNewVisitor.reset();

}
//end here

function validate(){
	var InstType = document.getq_form.InstType.options[document.getq_form.InstType.selectedIndex].value
	var Symbol =  document.getq_form.Symbol.options[document.getq_form.Symbol.selectedIndex].value
	var ExpDate =  document.getq_form.ExpDate.options[document.getq_form.ExpDate.selectedIndex].value
	var OptType =  document.getq_form.OptType.options[document.getq_form.OptType.selectedIndex].value
	var StkPrice =  document.getq_form.StkPrice.options[document.getq_form.StkPrice.selectedIndex].value
	var msg = "Please select "		
		if(InstType==""){
			alert(msg + "Instrumen t Type ...!")
			return false;
		}
		if(Symbol==""){
			alert(msg + "Symbol ...!")
			return false;
		}
		if(ExpDate==""){
			alert(msg + "Expiry Date ...!")
			return false;
		}
		if(InstType=='OPTIDX' || InstType=='OPTSTK'){
			if(OptType==""){
				alert(msg + "Otion Type ...!")
				return false;
			}
			if(StkPrice==""){
				alert(msg + "Strike Price ...!")
				return false;
			}
		}					
}


//final check ..For Commodity get quotes
function CommValidate(){
	var Symbol =  document.getq_form.Symbol.options[document.getq_form.Symbol.selectedIndex].value
	var ExpDate =  document.getq_form.ExpDate.options[document.getq_form.ExpDate.selectedIndex].value

	var msg = "Please select "		
		if(Symbol==""){
			alert(msg + "Symbol ...!")
			return false;
		}
		if(ExpDate==""){
			alert(msg + "Expiry Date ...!")
			return false;
		}
}

function onChange(pgName){
   document.getq_form.action = pgName
   document.getq_form.submit();
}

function onChangeSymbol(pgName){
   document.frmMain.action = pgName
   document.frmMain.submit();
}

//For Customer Support Page
	
function QueryValidate()
{
	var str1 = document.supportForm.txt_mail.value
	var filter1=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
	
	if(document.supportForm.txt_mail.value == "") 
	{	alert("Please enter your email id !");
		document.supportForm.txt_mail.focus();
		return(false);
	}
	if(document.supportForm.txt_query.value == "") 
	{	alert("Please enter your Query !");
		document.supportForm.txt_query.focus();
		return(false);
	}
	{
		if (filter1.test(str1))
		   {
			  return (true)
			}
				alert("Invalid E-mail Address! Please re-enter.")
				return (false);
	}
}



function ForgotValidate()
{
	if(document.frmforgot.userid.value=="" || isWhitespace(document.frmforgot.userid.value))
		{
			alert("Enter Your UserId")
			document.frmforgot.userid.focus()
			return false
		}		
}





function showContract(opt){
if(opt!="SE"){
switch (opt){ 	
	case '1' :
		document.location="foMostActContract.asp?a=10&SortOrder=TradedQty&pageOpt=1"
	break; 
	case '2' :
		document.location="foMostActContract.asp?a=10&SortOrder=TradedQty&InstType=FUTIDX&symbol=nifty&pageOpt=2"
	break; 
	case '3' :
		document.location="foMostActContract.asp?a=10&SortOrder=TradedQty&InstType=OPTIDX&symbol=nifty&pageOpt=3"
	break; 
	case '4' :
		document.location="foMostActContract.asp?a=10&SortOrder=TradedQty&InstType=FUTIDX&symbol=CNXIT&Sym=S&pageOpt=4"
	break; 
	case '5' :
		document.location="foMostActContract.asp?a=10&SortOrder=TradedQty&InstType=OPTIDX&symbol=CNXIT&Sym=S&pageOpt=5"
	break; 
	case '6' :
		document.location="foMostActContract.asp?a=10&SortOrder=TradedQty&InstType=FUTSTK&Sym=SP&pageOpt=6"
	break; 
	case '7' :
		document.location="foMostActContract.asp?a=10&SortOrder=TradedQty&InstType=OPTSTK&Sym=SP&pageOpt=7"
	break; 
} 
}
}

function empty()
{
	if (document.frmQuotes.txtQuotes.value=="Enter Company Name")
	{
	  document.frmQuotes.txtQuotes.value="";
	 }
}

function fill()
{
	var getquote=document.frmQuotes.txtQuotes.value;
	if (getquote=="")
	{
		document.frmQuotes.txtQuotes.value="Enter Company Name";
	}
}

