function openWin1(url)
{
var j=window.open(url,"jj","left=20, top=20, width=600,height=570,scrollbars=1") 
}

function openWinReceipt(url)
{
var j=window.open(url,"jj","left=20, width=780, height=800,scrollbars=1") 
}

function floatsonly(e, txtvalue) {

    var floatflag;
    if (e.keyCode) keycode = e.keyCode;
    else keycode = e.which;

    if (e.shiftKey && keycode != 9) {
        return false;
    }
    if (keycode == 9 || keycode == 46 || keycode == 37 || keycode == 39 || keycode == 36 || keycode == 35) {
        return true;
    }

    if (keycode != 8) {
        if (keycode == 110 || keycode == 190) {
            if (txtvalue.indexOf(".") == -1) {
                return true;
            }
            else {
                return false;
            }
        }
        if ((keycode < 48 || keycode > 57) && (keycode < 96 || keycode > 105))
            return false
    }
}

function numbersonly(e) {
    if (e.shiftKey && keycode != 9) {
        return false;
    }

    if (e.keyCode) keycode = e.keyCode;
    else keycode = e.which;
    if (keycode == 9 || keycode == 46 || keycode == 37 || keycode == 39 || keycode == 36 || keycode == 35) {
        return true;
    }
    if (keycode != 8) {
        if ((keycode < 48 || keycode > 57) && (keycode < 96 || keycode > 105))
            return false
    }
}

function isBlank(val)
{
	if(val==null){return true;}
	for(var i=0;i<val.length;i++) 
	{
		if ((val.charAt(i)!=' ')&&(val.charAt(i)!="\t")&&(val.charAt(i)!="\n")&&(val.charAt(i)!="\r")){return false;}
	}
	return true;
}
function checkMaxLengthOnKeyPress(foEvent, foTextArea, foMaxlength)
{
    if(foEvent.charCode || window.event)
    {
        return foTextArea.value.length < foMaxlength;
    }
    else
    {
        return true;
    }
}

function checkMaxLengthOnBlur(foEvent, foTextArea, foMaxlength)
{
    if (foTextArea.value.length > foMaxlength)
    {
        foTextArea.value = foTextArea.value.substring(0, foMaxlength);
    }
}
function FocusImage(stObj)
{
    if (document.getElementById(stObj.id))
    {
       if (stObj.value.length==0)
       {
            stObj.style.backgroundImage = "";
       }
    }
}
function BlurImage(stObj,stType)
{
    if (document.getElementById(stObj.id))
    {
        if (stObj.value.length==0)
        {
            if (stType == "p")
            {
                stObj.style.background = "url( images/password.gif ) no-repeat 10px 5px";
            }
            else
            {
                stObj.style.background = "url( images/username.gif ) no-repeat 10px 5px";
            }
        }
    }
}
function setFormAction(fsActionURL) {
    var loForm = document.getElementById('form1');
    if (loForm == null)
        loForm = document.getElementById('aspnetForm');
    loForm.setAttribute("action", fsActionURL);
}
