function doBeforePaste(control) {
    maxLength = control.attributes["MaxLength"].value;
    if (maxLength) {
        event.returnValue = false;
    }
}
function doPaste(control) {
    maxLength = control.attributes["MaxLength"].value;
    value = control.value;
    if (maxLength) {
        event.returnValue = false;
        maxLength = parseInt(maxLength);
        var oTR = control.document.selection.createRange();
        var iInsertLength = maxLength - value.length + oTR.text.length;
        var sData = window.clipboardData.getData("Text").substr(0, iInsertLength);
        oTR.text = sData;
    }
}
function LimitInput(control) {
    if (control.value.length > control.attributes["MaxLength"].value) {
        control.value = control.value.substring(0, control.attributes["MaxLength"].value);
    }
};
function CheckNumericOnly(e) {

    var key;
    key = e.which ? e.which : e.keyCode;
    if ((key >= 48 && key <= 57) || key == 40 || key == 46 || key == 41 || key == 44 || key == 8 || key == 32 || key == 45 || key == 9 || key == 37 || key == 38 || key == 39 || key == 40 || key == 36 || key == 35 || key == 13)
    { return true; }
    else {
        alert("Please Enter Numeric.");
        return false;
    }
}

function textMaxLength(obj, maxLength, evt) {
    var charCode = (evt.which) ? evt.which : event.keyCode
    var max = maxLength - 0;
    var text = obj.value;
    if (text.length > max) {
        var ignoreKeys = [8, 46, 37, 38, 39, 40, 35, 36];
        for (i = 0; i < ignoreKeys.length; i++) {
            if (charCode == ignoreKeys[i]) {
                return true;
            }
        }
        return false;
    } else {
        return true;
    }
}


/***********************************************
* Fixed ToolTip script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var tipwidth = '150px' //default tooltip width
var tipbgcolor = '#ffffcc'  //tooltip bgcolor
var disappeardelay = 250  //tooltip disappear speed onMouseout (in miliseconds)
var vertical_offset = "-15px" //horizontal offset of tooltip from anchor link
var horizontal_offset = "22px" //horizontal offset of tooltip from anchor link

/////No further editting needed

var ie4 = document.all
var ns6 = document.getElementById && !document.all

if (ie4 || ns6)
    document.write('<div id="fixedtipdiv" class="fixedtipdiv" style="visibility:hidden;text-align: Justify;padding-right: 5px; padding-left: 5px;width:' + tipwidth + ';background-color:' + tipbgcolor + '" ></div>')
if (ie4 || ns6)
    document.write('<div id="fixedtipdiv1" style="visibility:hidden;padding-left: 5px;width:' + tipwidth + ';background-color:' + tipbgcolor + ';position:absolute;font:normal 8pt Arial;z-index:110" ></div>')
if (ie4 || ns6)
    document.write('<div id="divRoundStyle" style="visibility:hidden;text-align: left;color:#666;border:1px solid #dbdbdb;border-left:2px solid #dbdbdb;-moz-border-radius-topright:10px;-moz-border-radius-bottomright:10px;-webkit-border-top-right-radius:10px;-webkit-border-bottom-right-radius:10px;padding:3px 10px 7px 30px;line-height:1.45em;background:#f2f2f2 url(images/signup_info.gif) no-repeat 5px 50%;text-transform:lowercase;width:' + tipwidth + ';position:absolute;font:normal 8pt Arial;z-index:110" ></div>')

function getposOffset(what, offsettype) {
    var totaloffset = (offsettype == "left") ? what.offsetLeft : what.offsetTop;
    var parentEl = what.offsetParent;
    while (parentEl != null) {
        totaloffset = (offsettype == "left") ? totaloffset + parentEl.offsetLeft : totaloffset + parentEl.offsetTop;
        parentEl = parentEl.offsetParent;
    }
    return totaloffset;
}


function showhide(obj, e, visible, hidden, tipwidth) {
    if (ie4 || ns6)
        dropmenuobj.style.left = dropmenuobj.style.top = -500
    if (tipwidth != "") {
        dropmenuobj.widthobj = dropmenuobj.style
        dropmenuobj.widthobj.width = tipwidth
    }
    if (e.type == "click" && obj.visibility == hidden || e.type == "mouseover")
        obj.visibility = visible
    else if (e.type == "click")
        obj.visibility = hidden
    else
        obj.visibility = visible
}

function iecompattest() {
    return (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge) {
    var edgeoffset = (whichedge == "rightedge") ? parseInt(horizontal_offset) * -1 : parseInt(vertical_offset) * -1
    if (whichedge == "rightedge") {
        var windowedge = ie4 && !window.opera ? iecompattest().scrollLeft + iecompattest().clientWidth - 15 : window.pageXOffset + window.innerWidth - 15
        dropmenuobj.contentmeasure = dropmenuobj.offsetWidth
        if (windowedge - dropmenuobj.x < dropmenuobj.contentmeasure)
            edgeoffset = dropmenuobj.contentmeasure - obj.offsetWidth
    }
    else {
        var windowedge = ie4 && !window.opera ? iecompattest().scrollTop + iecompattest().clientHeight - 15 : window.pageYOffset + window.innerHeight - 18
        dropmenuobj.contentmeasure = dropmenuobj.offsetHeight
        if (windowedge - dropmenuobj.y < dropmenuobj.contentmeasure)
            edgeoffset = dropmenuobj.contentmeasure + obj.offsetHeight
    }
    return edgeoffset
}

function fixedtooltip(menucontents, obj, e, tipwidth) {
    if (window.event) event.cancelBubble = true
    else if (e.stopPropagation) e.stopPropagation()
    clearhidetip()
    dropmenuobj = document.getElementById ? document.getElementById("fixedtipdiv") : fixedtipdiv
    dropmenuobj.innerHTML = menucontents

    if (ie4 || ns6) {
        showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
        dropmenuobj.x = getposOffset(obj, "left")
        dropmenuobj.y = getposOffset(obj, "top")
        dropmenuobj.style.backgroundColor = "#c0d4e9";

        //dropmenuobj.appendChild("<IMG STYLE='z-index:0;position:absolute;top:0;' SRC='./images/ajax-loader.gif' HEIGHT=100% WIDTH=100% />");
        //dropmenuobj.innerHTML += "<IMG STYLE='z-index:0;position:absolute;top:0;' SRC='./images/ajax-loader.gif' HEIGHT=100% WIDTH=100% />"
        //dropmenuobj.style.backgroundImage = "url(./images/ajax-loader.gif)";   //'http://' + window.location.host + '/Atco-2008/Images/add.gif';
        dropmenuobj.style.left = dropmenuobj.x - clearbrowseredge(obj, "rightedge") + "px"
        dropmenuobj.style.top = dropmenuobj.y - clearbrowseredge(obj, "bottomedge") + obj.offsetHeight + "px"
    }
    obj.style.cursor = "pointer";
}

///////////////// Start By Mitesh For Description /////////////////
function setDescription(menucontents, obj, e, tipwidth) {
    // debugger;
    if (window.event) event.cancelBubble = true
    else if (e.stopPropagation) e.stopPropagation()
    clearhidetip()
    dropmenuobj = document.getElementById ? document.getElementById("divRoundStyle") : divRoundStyle
    dropmenuobj.innerHTML = menucontents
    if (ie4 || ns6) {
        showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
        //dropmenuobj.x=getposOffset(obj, "left")+190
        dropmenuobj.x = 560
        //alert(getposOffset(obj, "left")+190);
        dropmenuobj.y = getposOffset(obj, "top") - 5
        //dropmenuobj.style.backgroundColor = "#FFFFFF";

        //dropmenuobj.appendChild("<IMG STYLE='z-index:0;position:absolute;top:0;' SRC='./images/ajax-loader.gif' HEIGHT=100% WIDTH=100% />");
        //dropmenuobj.innerHTML += "<IMG STYLE='z-index:0;position:absolute;top:0;' SRC='./images/ajax-loader.gif' HEIGHT=100% WIDTH=100% />"
        //dropmenuobj.style.backgroundImage = "url(./images/ajax-loader.gif)";   //'http://' + window.location.host + '/Atco-2008/Images/add.gif';
        //debugger;
        if ((screen.width <= 1024) && (screen.height <= 768)) {
            dropmenuobj.style.left = getposOffset(obj, "left") + obj.offsetWidth + "px";
            //dropmenuobj.style.left = dropmenuobj.x - clearbrowseredge(obj, "rightedge") + 100 + "px";
        }
        else if ((screen.width > 1024) && (screen.height >= 600)) {
            //dropmenuobj.style.left = dropmenuobj.x - clearbrowseredge(obj, "rightedge") + 270 + "px";
            dropmenuobj.style.left = getposOffset(obj, "left") + obj.offsetWidth + "px";
        }
        dropmenuobj.style.top = getposOffset(obj, "top") + "px";
        dropmenuobj.style.height = obj.offsetHeight - 12 + "px";
        //dropmenuobj.style.top = dropmenuobj.y - clearbrowseredge(obj, "bottomedge") + obj.offsetHeight + "px";
    }
    //obj.style.cursor="pointer";
}
function fixedDescription(menucontents, obj, e, tipwidth) {
    if (window.event) event.cancelBubble = true
    else if (e.stopPropagation) e.stopPropagation()
    clearhidetip()
    dropmenuobj = document.getElementById ? document.getElementById("fixedtipdiv1") : fixedtipdiv1
    dropmenuobj.innerHTML = menucontents
    if (ie4 || ns6) {
        showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
        //dropmenuobj.x=getposOffset(obj, "left")+190
        dropmenuobj.x = 560
        //alert(getposOffset(obj, "left")+190);
        dropmenuobj.y = getposOffset(obj, "top") - 5
        dropmenuobj.style.backgroundColor = "#FFFFFF";

        //dropmenuobj.appendChild("<IMG STYLE='z-index:0;position:absolute;top:0;' SRC='./images/ajax-loader.gif' HEIGHT=100% WIDTH=100% />");
        //dropmenuobj.innerHTML += "<IMG STYLE='z-index:0;position:absolute;top:0;' SRC='./images/ajax-loader.gif' HEIGHT=100% WIDTH=100% />"
        //dropmenuobj.style.backgroundImage = "url(./images/ajax-loader.gif)";   //'http://' + window.location.host + '/Atco-2008/Images/add.gif';
        //debugger;
        if ((screen.width <= 1024) && (screen.height <= 768)) {
            dropmenuobj.style.left = dropmenuobj.x - clearbrowseredge(obj, "rightedge") + 100 + "px";
        }
        else if ((screen.width > 1024) && (screen.height >= 600)) {
            dropmenuobj.style.left = dropmenuobj.x - clearbrowseredge(obj, "rightedge") + 270 + "px";
        }
        dropmenuobj.style.top = dropmenuobj.y - clearbrowseredge(obj, "bottomedge") + obj.offsetHeight + "px";
    }
    //obj.style.cursor="pointer";
}
///////////////// End By Mitesh For Description /////////////////

function hidetip(e) {
    if (typeof dropmenuobj != "undefined") {
        if (ie4 || ns6)
            dropmenuobj.style.visibility = "hidden"
    }
}

function delayhidetip() {
    if (ie4 || ns6)
        delayhide = setTimeout("hidetip()", disappeardelay)
}

function clearhidetip() {
    if (typeof delayhide != "undefined")
        clearTimeout(delayhide)
}

/**************************End ToolTip******************************/
/*************************************************************************
Image Rotator
*************************************************************************/
dw_Rotator.restartDelay = 500; // delay onmouseout before call to rotate
dw_Rotator.col = [];

// arguments: image name, rotation speed, path to images (optional), 
// target, i.e. name of window to direct url's to onclick (optional)
function dw_Rotator(name, speed, path, tgt) {
    this.name = name; this.speed = speed || 4500; // default speed of rotation
    this.path = path || ""; this.tgt = tgt;
    this.ctr = 0; this.timer = 0; this.imgs = []; this.actions = [];
    this.index = dw_Rotator.col.length; dw_Rotator.col[this.index] = this;
    this.animString = "dw_Rotator.col[" + this.index + "]";
}

dw_Rotator.prototype.addImages = function() { // preloads images
    var img;
    for (var i = 0; arguments[i]; i++) {
        img = new Image();
        img.src = this.path + arguments[i];
        this.imgs[this.imgs.length] = img;
    }
}

dw_Rotator.prototype.addActions = function() {
    var len = arguments.length; // in case an argument's value is null
    for (var i = 0; i < len; i++)
        this.actions[this.actions.length] = arguments[i];
}

dw_Rotator.prototype.rotate = function() {
    clearTimeout(this.timer); this.timer = null;
    if (this.ctr < this.imgs.length - 1) this.ctr++;
    else this.ctr = 0;
    var imgObj = document.images[this.name];
    if (imgObj) {
        imgObj.src = this.imgs[this.ctr].src;
        this.timer = setTimeout(this.animString + ".rotate()", this.speed);
    }
}

// Start rotation for all instances 
dw_Rotator.start = function() {
    var len = dw_Rotator.col.length, obj;
    for (var i = 0; i < len; i++) {
        obj = dw_Rotator.col[i];
        if (obj && obj.name) // check for empty instance created by dw_random.js
            obj.timer = setTimeout(obj.animString + ".rotate()", obj.speed);
    }
}

// called onclick of images
dw_Rotator.doClick = function(n) {
    var obj = dw_Rotator.col[n];
    if (!document.images || !obj) return true;
    if (obj.actions && obj.actions[obj.ctr]) {
        if (typeof obj.actions[obj.ctr] == "string") { // url
            if (obj.tgt) { // open in separate window
                // add features here if you want, i.e., chrome, size, position, ...
                var win = window.open(obj.actions[obj.ctr], obj.tgt);
                if (win && !win.closed) win.focus();
            } else {
                window.location = obj.actions[obj.ctr];
            }
        } else { // function pointer 
            obj.actions[obj.ctr](); // execute function
        }
    }
    return false;
}

// for stopping/starting onmouseover/out
dw_Rotator.pause = function(n) {
    dw_Rotator.clearTimers(n);
}

dw_Rotator.clearTimers = function(n) {
    var obj = dw_Rotator.col[n];
    if (obj) {
        clearTimeout(obj.timer); obj.timer = null;
    }
}

dw_Rotator.resume = function(n) {
    dw_Rotator.clearTimers(n);
    var obj = dw_Rotator.col[n];
    if (obj) {
        obj.timer = setTimeout(obj.animString + ".rotate()", dw_Rotator.restartDelay);
    }
}
/**********End Image Rotator*************************/


function LeftMenuHover(id) {
    btn = document.getElementById(id);
    btn.className = "DivLeftMenuHover";
}
function LeftMenuOut(id) {
    btn = document.getElementById(id);
    btn.className = "DivLeftMenu";
}
function BtnMenuHover(id) {
    btn = document.getElementById(id);
    btn.className = "DivMNUBtnHover";
}
function BtnMenuOut(id) {
    btn = document.getElementById(id);
    btn.className = "DivMNUBtn";
}


var bToggle = 0;
function fnToggle(id) {
    var obj = document.getElementById(id);
    obj.filters[0].Apply();

    // After setting Apply, changes to the obj object 
    //   are not displayed until Play is called.

    if (bToggle) {
        bToggle = 0;
        obj.style.visibility = "visible";
    }
    else {
        bToggle = 1;
        obj.style.visibility = "hidden";
    }
    obj.filters[0].Play();
}
function startLogoAnim() {
    setInterval("fnToggle('logo')", 2000);
}
function BoostSalesHover() {
    var obj = document.getElementById("BoostSaleInfo");
    var mnu = document.getElementById("mnuBoostSales");
    mnu.className = "DivMNUBtnHover";
    //	setTopHover("mnuBoostCust",250);
    setTopHover("mnuBoostCash", 210);
    setTopHover("mnuBoostProfit", 210);
    setTopHover("mnuReduceExStock", 210);
    setTopHover("mnuReduceDebt", 210);
    obj.style.visibility = "visible";
    var Eobj = document.getElementById("divAtcoCard");
    Eobj.style.visibility = "hidden";
}
function BoostSalesOut() {
    var obj = document.getElementById("BoostSaleInfo");
    var mnu = document.getElementById("mnuBoostSales");
    mnu.className = "DivMNUBtn";
    //	setTopOut("mnuBoostCust",250);
    setTopOut("mnuBoostCash", 210);
    setTopOut("mnuBoostProfit", 210);
    setTopOut("mnuReduceExStock", 210);
    setTopOut("mnuReduceDebt", 210);
    obj.style.visibility = "hidden";
    var Eobj = document.getElementById("divAtcoCard");
    Eobj.style.visibility = "visible";
}
function BoostCustHover() {
    var obj = document.getElementById("boostCustinfo");
    var mnu = document.getElementById("mnuBoostCust");
    mnu.className = "DivMNUBtnHover";
    //	setTopHover("mnuBoostSales",210);
    setTopHover("mnuBoostCash", 250);
    setTopHover("mnuBoostProfit", 250);
    setTopHover("mnuReduceExStock", 250);
    setTopHover("mnuReduceDebt", 250);
    obj.style.visibility = "visible";
    var Eobj = document.getElementById("divAtcoCard");
    Eobj.style.visibility = "hidden";
}
function BoostCustOut() {
    var obj = document.getElementById("boostCustinfo");
    var mnu = document.getElementById("mnuBoostCust");
    mnu.className = "DivMNUBtn";
    //	setTopOut("mnuBoostSales",210);
    setTopOut("mnuBoostCash", 250);
    setTopOut("mnuBoostProfit", 250);
    setTopOut("mnuReduceExStock", 250);
    setTopOut("mnuReduceDebt", 250);
    obj.style.visibility = "hidden";
    var Eobj = document.getElementById("divAtcoCard");
    Eobj.style.visibility = "visible";
}
function BoostCashHover() {
    var obj = document.getElementById("boostCashinfo");
    var mnu = document.getElementById("mnuBoostCash");
    mnu.className = "DivMNUBtnHover";
    //	setTopHover("mnuBoostSales",210);
    //	setTopHover("mnuBoostCust",250);
    //	setTopHover("mnuBoostProfit",250);
    setTopHover("mnuReduceExStock", 210);
    setTopHover("mnuReduceDebt", 210);
    obj.style.visibility = "visible";
    var Eobj = document.getElementById("divAtcoCard");
    Eobj.style.visibility = "hidden";
}
function BoostCashOut() {
    var obj = document.getElementById("boostCashinfo");
    var mnu = document.getElementById("mnuBoostCash");
    mnu.className = "DivMNUBtn";
    //	setTopOut("mnuBoostSales",210);
    //	setTopOut("mnuBoostCust",250);
    //	setTopOut("mnuBoostProfit",250);
    setTopOut("mnuReduceExStock", 210);
    setTopOut("mnuReduceDebt", 210);
    obj.style.visibility = "hidden";
    var Eobj = document.getElementById("divAtcoCard");
    Eobj.style.visibility = "visible";
}
function BoostProfitHover() {
    var obj = document.getElementById("boostProfitinfo");
    var mnu = document.getElementById("mnuBoostProfit");
    mnu.className = "DivMNUBtnHover";
    //	setTopHover("mnuBoostSales",210);
    //	setTopHover("mnuBoostCust",250);
    //	setTopHover("mnuBoostProfit",250);
    setTopHover("mnuReduceExStock", 340);
    setTopHover("mnuReduceDebt", 340);
    obj.style.visibility = "visible";
    var Eobj = document.getElementById("divAtcoCard");
    Eobj.style.visibility = "hidden";
}
function BoostProfitOut() {
    var obj = document.getElementById("boostProfitinfo");
    var mnu = document.getElementById("mnuBoostProfit");
    mnu.className = "DivMNUBtn";
    //	setTopOut("mnuBoostSales",210);
    //	setTopOut("mnuBoostCust",250);
    //	setTopOut("mnuBoostProfit",250);
    setTopOut("mnuReduceExStock", 340);
    setTopOut("mnuReduceDebt", 340);
    obj.style.visibility = "hidden";
    var Eobj = document.getElementById("divAtcoCard");
    Eobj.style.visibility = "visible";
}
function ReduceHover() {
    var obj = document.getElementById("Reduceinfo");
    var mnu = document.getElementById("mnuReduceExStock");
    mnu.className = "DivMNUBtnHover";
    //	setTopHover("mnuBoostSales",210);
    //	setTopHover("mnuBoostCust",250);
    //	setTopHover("mnuBoostProfit",250);
    //	setTopHover("mnuReduceExStock",210);
    //	setTopHover("mnuReduceDebt",210);
    obj.style.visibility = "visible";
    var Eobj = document.getElementById("divAtcoCard");
    Eobj.style.visibility = "hidden";
}
function ReduceOut() {
    var obj = document.getElementById("Reduceinfo");
    var mnu = document.getElementById("mnuReduceExStock");
    mnu.className = "DivMNUBtn";
    //	setTopOut("mnuBoostSales",210);
    //	setTopOut("mnuBoostCust",250);
    //	setTopOut("mnuBoostProfit",250);
    //	setTopOut("mnuReduceExStock",210);
    //	setTopOut("mnuReduceDebt",210);
    obj.style.visibility = "hidden";
    var Eobj = document.getElementById("divAtcoCard");
    Eobj.style.visibility = "visible";
}
function ReduceDebtHover() {
    var obj = document.getElementById("ReduceDebtinfo");
    var mnu = document.getElementById("mnuReduceDebt");
    mnu.className = "DivMNUBtnHover";
    //	setTopHover("mnuBoostSales",210);
    //	setTopHover("mnuBoostCust",250);
    //	setTopHover("mnuBoostProfit",250);
    //	setTopHover("mnuReduceExStock",210);
    //	setTopHover("mnuReduceDebt",210);
    obj.style.visibility = "visible";
    var Eobj = document.getElementById("divAtcoCard");
    Eobj.style.visibility = "hidden";
}
function ReduceDebtOut() {
    var obj = document.getElementById("ReduceDebtinfo");
    var mnu = document.getElementById("mnuReduceDebt");
    mnu.className = "DivMNUBtn";
    //	setTopOut("mnuBoostSales",210);
    //	setTopOut("mnuBoostCust",250);
    //	setTopOut("mnuBoostProfit",250);
    //	setTopOut("mnuReduceExStock",210);
    //	setTopOut("mnuReduceDebt",210);
    obj.style.visibility = "hidden";
    var Eobj = document.getElementById("divAtcoCard");
    Eobj.style.visibility = "visible";
}
function setTopHover(id, value) {
    var obj = document.getElementById(id);
    var s = obj.style.top;
    var l = s.length;
    var ss = s.substring(0, l - 2);
    l = parseInt(ss) + value;
    obj.style.top = l;
}
function setTopOut(id, value) {
    var obj = document.getElementById(id);
    var s = obj.style.top;
    var l = s.length;
    var ss = s.substring(0, l - 2);
    l = parseInt(ss) - value;
    obj.style.top = l;
}
function btnLoginHover() {
    var obj = document.getElementById("btnLogin");
    obj.className = "DivMNUBtnHover";
}
function btnLoginOut() {
    var obj = document.getElementById("btnLogin");
    obj.className = "DivMNUBtn";
}

function CheckNumericValue(e) {

    var key;
    key = e.which ? e.which : e.keyCode;
    if (key >= 48 && key <= 57) {
        return true;
    }
    else {
        alert("please enter number only");
        return false;
    }
}
function CheckNemericValue2(e) {
    var key;
    key = e.which ? e.which : e.keyCode;
    if (key >= 48 && key <= 57) {
        return true;
    }
    else {
        alert("please enter number only");
        return false;
    }
}

function CheckNemericValue3(e) {
    var key;
    key = e.which ? e.which : e.keyCode;
    if (key >= 48 && key <= 57) {
        return true;
    }
    else {
        alert("please enter number only");
        return false;
    }
}
function CheckNemericValue4(e) {
    var key;
    key = e.which ? e.which : e.keyCode;
    if (key >= 48 && key <= 57) {
        return true;
    }
    else {
        alert("please enter number only");
        return false;
    }
}

function CheckNemericValue5(e) {
    var key;
    key = e.which ? e.which : e.keyCode;
    if (key >= 48 && key <= 57) {
        return true;
    }
    else {
        alert("please enter number only");
        return false;
    }
}


function CheckNemericDecimal(e) {
    var key;
    key = e.which ? e.which : e.keyCode;
    if (key >= 48 && key <= 57 || key == 190) {
        return true;
    }
    else {
        alert("please enter number only");
        return false;
    }
}
function numericonly(e, obj) {
    //debugger;

    var code = e.which ? e.which : e.keyCode;
    if (code != 8 && code != 9) {
        if (code >= 48 && code <= 57 && code != 13 || code >= 37 && code <= 40) {
            if (code == 48) {
                if (obj.value == 0) {
                    alert("value must be greater than 0");
                    return false;
                }
            }
            return true;
        }
        else {
            return false;
        }
    }
}
function decimalonly(e, obj) {
    //debugger;
    var code = e.which ? e.which : e.keyCode;
    if (code != 8 && code != 9) {
        if (code >= 48 && code <= 57 && code != 13 || code == 46 || code >= 37 && code <= 40) {
            if (code == 48) {
                if (obj.value == 0) {
                    alert("Value  must be greater than 0");
                    return false;
                }
            }
            else if (code == 46) {
                i = obj.value.indexOf(".");
                if (i != -1) return false;
            }
            return true;
        }
        else {
            alert("please enter number only");
            return false;
        }
    }
}    