﻿// JScript File
var HostUrlForPages="..";
 function CheckAlphaNumericName(_char, _mozChar) 
{
//alert(_char);
 if(_mozChar != null) 
  { // Look for a Mozilla-compatible browser
    if( (_mozChar >= 65 && _mozChar <= 90) || (_mozChar >= 97 && _mozChar <= 122) || (_mozChar == 13) || (_mozChar==47) ||(_mozChar ==39)) _RetVal= true;
    else 
    {
      _RetVal = false;
      alert('Please enter alphanumeric values  only.');
    }
  }
  else { // Must be an IE-compatible Browser
    if( (_char >= 65 && _char <= 90) || (_char >= 97 && _char <= 122) || (_char == 13) || (_char==47)||(_char==39)) _RetVal = true;
    else 
    {
      _RetVal = false;
      alert('Please enter alphanumeric values  only.');
    }
  }
  return _RetVal;
} 

//function validatesearch()
//{
//    if(document.getElementById("searchvalue").value=="")
//    {
//      alert("Please select option");
//      return false;
//    }
//    if(document.getElementById("txtsearch").value=="")
//    {
//        alert("Please enter company");
//      
//        document.getElementById("txtsearch").focus();
//          return false;
//    }
//    if(document.getElementById("searchvalue").value == "Q")
//    { 
//        window.location.href= "..company-profile/CompanyList.aspx?SrchQuote=" + document.getElementById("txtsearch").value +"&id=65";
//        return false;
//    }
//    if(document.getElementById("searchvalue").value == "N")
//    { 
//        window.location.href="mutual-fund/Nav-Search.aspx?Alphabet=" + document.getElementById("txtsearch").value;
//        return false;
//    }
//}

function validatesearch()
{
    if(document.getElementById("ddlcomnav").value=="")
    {
      alert("Please select option");
      return false;
    }
    if(document.getElementById("ddlcomnav").value=="")
    {
        alert("Please Enter Company");
      
        document.getElementById("ddlcomnav").focus();
          return false;
    }
    if(document.getElementById("ddlcomnav").value == "Q")
    { 
        window.location.href="../CompanyProfile/CompanyList.aspx?SrchQuote=" + document.getElementById("txtsearch").value +"&id=65";
        return false;
    }
    if(document.getElementById("ddlcomnav").value == "N")
    { 
        window.location.href="../MutualFund/Nav-Search.aspx?Alphabet=" + document.getElementById("txtsearch").value;
        return false;
    }
}



