function _uc(ig_)
{
	return ig_.toUpperCase()
}

function _trim(ig_)
{
	return ig_.replace(/^\s*|\s*$/g,"")
}

function _esc(ig_)
{
	return window.encodeURIComponent?encodeURIComponent(ig_):escape(ig_)
}

var ig_fa=function(ig_)
{
	return window.decodeURIComponent?decodeURIComponent(ig_):unescape(ig_)
}
var _unesc=ig_fa;

function winpopup(strUrl)
{	
	 var strUrl;
	 var newWin=window.open(strUrl,'MyWindow2','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();
}

function winpopupFull(strUrl)
{	
	 var strUrl;
	 var newWin=window.open(strUrl,'MyWindow1','x=0,y=0,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=1,copyhistory=no,channelmode=1,screenX=0,screenY=0,left=0,top=0');	
	 newWin.focus();
}

function redirectUrl(strUrl)
{	
	window.location = strUrl;
}

function ShowA2ZIndexAll(redUrl_,Index){
	var A2ZIndexId = document.getElementById("A2ZIndex");
	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_ +"&var="+ Alpha +"'  class="+ A2ZClass +" >"+ Alpha +"</a>";
			}	
				A2ZIndexId.innerHTML = A2Z;
	}
	else
		A2ZIndexId.innerHTML = "";			
}

function GetQuotes()
{
	var txtScrip = document.getElementById("txtScrip").value;	
	var drpQuotes= document.getElementById("drpQuotes").value;
	var drpQuotes  = (drpQuotes=="") ? "PI3_PI0" : drpQuotes;
	var StrUrl = "../Profile/ScripSearch.aspx?schtxt="+ txtScrip +"&pnav="+ drpQuotes;
	if(txtScrip=="")	{
		alert("Enter NSE, BSE codes for a company. Or Enter a few characters from the company's name")
		return false;
	}
	else if(txtScrip.length<3)	{
		alert("Enter More than 2 Characters")
		return false;
	}
	else	
	window.location = StrUrl;
}
