    //<script type="text/javascript" src="~/App_Themes/Tools.js">    </script>
 function PopupPickerAdmin(ctl,w,h)
 {
    var PopupWindow=null;
    settings='width='+ w + ',height='+ h + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';
    PopupWindow=window.open('../Controls/DatePicker.aspx?Ctl=' + ctl,'DatePicker',settings);
    PopupWindow.focus();
 }

function ValidateLength(oid, min, max)
{
    var txt = document.getElementById(oid);
    var length = txt.value.length;

    alert("input's length is " + length);
    if(length<min || length>max)
    {
    alert("Invalidated!");
    }
        //else
        //{
        //alert("Validated!");
        //}
}



function PopupPicker(ctl,w,h)
{
    var PopupWindow=null;
    settings='width='+ 230 + ',height='+ 225 + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';
    PopupWindow=window.open('Controls/DatePicker.aspx?Ctl=' + ctl,'DatePicker',settings);
    PopupWindow.focus();
}
function AddressPicker(ctl,w,h)
{
    var PopupWindow;
    settings = 'width='+ w + ',height='+ h + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes,dependent=no';
    PopupWindow = window.open('MailAddressBook.aspx?Ctl=' + ctl,'MailAddressBook',settings);
    PopupWindow.focus();
}

//Attachment
function winOpenAttachment(url,clt)
{
    var newwindow;
	newwindow = window.open(url+ '?Ctl=' + clt,'Attachment', 'height=486,width=500,status=yes,toolbar=no,scrollbars=yes');
	//newwindow.moveTo(200,100);
	newwindow.focus();
	return false;
}
//Add for numerals in the control
function numeralsOnly(evt) 
{
    evt = (evt) ? evt : event;

    var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode :((evt.which) ? evt.which : 0));
    if (charCode > 31 && (charCode < 48 || charCode > 57)) 
    {
	    return false;
    }
    return true;
}

// <> are not allowed to enter in TextBox
function ValidNormalText(evt) 
{
    evt = (evt) ? evt : event;

    var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode :((evt.which) ? evt.which : 0));
    if (charCode != 60 && charCode != 62 && charCode != 39) 
    {
	    return true;
    }
    return false;
}
// <> are not allowed to enter in TextBox
function ValidSearchText(evt) 
{
    evt = (evt) ? evt : event;

    var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode :((evt.which) ? evt.which : 0));
    if (charCode != 60 && charCode != 62 && charCode != 39) 
    {
	    return true;
    }
    return false;
}

// For FeeUnit
function OnlyCurrency(evt) 
{
evt = (evt) ? evt : event;

var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode :((evt.which) ? evt.which : 0));
if (charCode > 31 && (charCode < 48 || charCode > 57) && charCode != 46)
 { 
  return false;
 }
return true;
} 

// Login Validator
function isValidName(evt) 
{
    evt = (evt) ? evt :event;
	
    var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode :((evt.which) ? evt.which : 0));
    if(charCode == 9 || charCode == 8)
    {
       return true;
    }
	if(charCode != 46  && charCode != 95 && (charCode < 48 || charCode > 57) && (charCode < 97 || charCode > 122) && (charCode < 65 || charCode > 90)) 
      { 
       return false;
      }
    return true;
}

// JScript File
function winOpen(url,name)
{
    var newwindow;
	newwindow = window.open(url,'name', 'height=486,width=500,status=yes,toolbar=no,scrollbars=yes');
	//newwindow.moveTo(200,100);
	newwindow.focus();
	return false;
}

//  <script type="text/javascript" src="App_Themes/Tools.js"></script>
//<input type="button" value="..." onclick="PopupPicker('DOBBox', 250, 250)"/>

