//submit ,refresh button. NOT WORKING PROPERLY - EJAY. Removed at LocationProductReportEntry.aspx
/////////////////////////////////////////////////////
function btn_setStatus(isDisabled,name,oldbtnid)
{
    var a = document.getElementById("a_" + name);
    var img = document.getElementById("img_" + name);
    img.disabled = isDisabled;
    a.disabled = isDisabled;
    a.href="javascript:"; 
    if(isDisabled)
    {
        a.onmouseover=function(){a.style.textDecoration = "none";}
        a.onclick=function(){}
    }
    else
    {
        a.onmouseover=function(){a.style.textDecoration = "underline";}
        a.onmouseout=function(){a.style.textDecoration = "none";}
        a.onclick=function(){document.getElementById(oldbtnid).click();setDidabled('submit');}
    }
}
function setDidabled(name)
{
    var img = document.getElementById("img_" + name);
    var a = document.getElementById("a_" + name);
    img.disabled = true;
    //a.disabled = true;
    //a.onmouseover=function(){a.style.textDecoration = "none";}
    //a.style.fontSize = "10pt";
    //a.innerText = "Please wait...";
    //a.href="javascript:";
    //a.onclick=function(){}
    
    setLinkDisabled(a);
}
///////////////////////////////////////////////////////

function GetNavigatorType()
{
    var navigatorName = navigator.appName;
    if(navigatorName == "Microsoft Internet Explorer")
        return 1;
    else if(navigatorName == "Netscape")
    {
        var ua = navigator.userAgent.toLowerCase();
        if(ua.indexOf("firefox") > 0)
            return 2;
        else if (ua.indexOf("safari") > 0)
            return 3;
    }
}
function setLinkDisabled(obj)
{
    var navType = GetNavigatorType();
    
    if(navType == 1)
    {
        obj.style.color = "gray";
        //obj.disabled = true;
        obj.onmouseover=function(){obj.style.textDecoration = "none";}
        obj.style.fontSize = "9pt";
        obj.href="javascript:";
        obj.onclick=function(){}    
    }
    else if (navType == 2)
    {
       obj.href = "javascript:";
       obj.onmouseover=function(){obj.style.color = "gray";}
       obj.style.color = "gray";
    }
    else if (navType == 3)
    {
       obj.href = "javascript:";
       obj.onmouseover=function(){obj.style.color = "gray";}
       obj.style.color = "gray";
    }
    else
    {
        obj.style.color = "gray";
        //obj.disabled = true;
        obj.onmouseover=function(){obj.style.textDecoration = "none";}
        obj.style.fontSize = "9pt";
        obj.href="javascript:";
        obj.onclick=function(){}    
    }
    
    obj.innerHTML = "Please wait...";
}

function setLinkButtonDisabled(obj,name)
{
    var lnkText = obj.rows[1].cells[0];
    lnkText.innerHTML = "<span style='color:gray;'>Please wait...</span>";
    obj.disabled = true;
    __doPostBack('ctl00$ContentPlaceHolder1$' + name,'');
}