function GetEnterKey(e, buttonid)
{
var evt = e ? e : window.event;
var bt = document.getElementById(buttonid);
if (bt)
    {
        if (evt.keyCode == 13)
            {
                bt.click();
                return false;
            }
    }
}

function ChangeCss(obj,valcss,display)
{    
    if(valcss!='#FFFFFF')
    {
        //obj.className = valcss;
        obj.style.borderColor = valcss;
        //obj.style.borderWidth = "1px";
        if(display==''||display=='none')
            obj.style.cursor = "pointer";
        else
        {
            obj.style.cursor = "crosshair";
           // obj.style.backgroundColor = "gray";
            //obj.style.filter = "alpha(opacity=40)";
        }
    }
    else
    {
        obj.pointer = "None";
        obj.style.borderColor = valcss;
        if(display!='')
        {
           // obj.style.backgroundColor = "gray";
            //obj.style.filter = "alpha(opacity=40)";
        }
        //obj.style.borderWidth = "px"
    }
}

function LoadDataSim(linecol, display) {
    if (display != '') {
        return;
    }

    var datecible = document.getElementById('ctl00_GeneralContentPlaceHolder_txtStartDate');
    var valocible = document.getElementById('ctl00_GeneralContentPlaceHolder_txtValInv1');

    var inpuval = document.getElementById('valorisationfield' + linecol);
    var inputdate = document.getElementById('datefield' + linecol);

    if (inputdate && inpuval) {
        datecible.value = inputdate.value;
        valocible.value = inpuval.value;
    }
}
