﻿// JScript File




function ValidateMainForm()
        {
         try
         {
         var disName=document.form1.txtSearch.value;
         //var catName=document.aspnetForm.ctl00_ddlSearch.value;
       	 if(disName=="")
	        {
		    alert("Please enter the product to search !!!");
		    document.form1.txtSearch.focus();
		    return false;
	        }
//	        if(catName=="0")
//	        {
//	        alert("Please select a category !!!");
//		    document.aspnetForm.ctl00_ddlSearch.focus();
//		    return false;
//	        }
           }
           catch(ex)           
           {
                alert("Error!!!" + ex)
           }
        }


   function Pop_coins(strPath)
    {
    window.open(strPath,'privacy','width=635,height=600,scrollbars=yes,resizable=0,menubar=no,toolbar=no,location=no,status=no,copyhistory=no');
    }


    function Pop(strPath) 
    {
    window.open(strPath,'privacy','height=560,width=635,scrollbars=no,resizable=1,menubar=no,toolbar=no,location=no,status=no,copyhistory=no');
    }


function validateOrderNo(ctrl, strValue)
{
    if (strValue =="")
    {
        alert("Please specify Consignment No.")
        ctrl.focus();
        return false;
    }
    else if (isNaN(strValue)==true)
    {
        ctrl.focus();
        alert("only numeric characters are allowed!")
        return false;
    }
    else if(strValue.match(/\s/g))
    {
        alert("only numeric characters are allowed!")
        ctrl.focus();
        return false;
    }
    else
    {
        return true;
    }


}
