function ResizeToFullScreen()
{
    window.moveTo(0,0);
    window.resizeTo(screen.availWidth,screen.availHeight);
}
function OpenWindFullScreen(url)
{
    window.open(url,"","fullscreen");
}

function SubmitKeyClick(button)
{
    if(event.keyCode == 13)
    {
        event.keyCode = 9;
        event.returnValue = false;
        document.all[button].click();
    }
}


function keyFalse()
{
    if(event.keyCode == 13)
    {
        event.keyCode = 9;
        event.returnValue = false;
        return false;
    }
    return true;
}

function getFocus(controlID)
{
    document.getElementsByName(controlID).item(0).focus();
}

function setVer(obj)
{
    obj.style.backgroundColor='';
    obj.value = '';
}

var currentMoveObj = null; 
var relLeft;   
var relTop;

function f_mdown(obj)
{
    currentMoveObj = obj;
    //currentMoveObj.style.position = "absolute";
    relLeft = event.x + document.getElementById('div-datagrid').scrollLeft;//currentMoveObj.style.pixelLeft;
    relTop = event.y + document.getElementById('div-datagrid').scrollTop;//currentMoveObj.style.pixelTop;
}

window.document.onmouseup = function()
{
    currentMoveObj = null;
}

function f_move(obj,varstr)
{
    if(currentMoveObj != null)
    {
        if(varstr==1)
        {
            //currentMoveObj.style.pixelLeft=event.x-relLeft;
            document.getElementById('div-datagrid').scrollLeft = relLeft - event.x ;
        }
        else if(varstr==2)
        {
            document.getElementById('div-datagrid').scrollTop = relTop - event.y ;
            //currentMoveObj.style.pixelTop=event.y-relTop;
        }
    }
}
