﻿function OnValidationNumberReload(linkUrl,imgId)
{
    var img =  document.getElementById(imgId);
    img.src = linkUrl + "?R=" + Math.random();
}
function ShowHide(divId)
{
    var div = document.getElementById(divId);
    if(div.style.display == 'none')
        div.style.display = 'block';
    else
        div.style.display = 'none';
    return false;
}
function DeleteConfirm(messageId, buttonId, hidId, msgText)
{
    var buton = document.getElementById(buttonId);
    var txt = document.getElementById(hidId);
    if(confirm(msgText))
    {
        txt.value = messageId;
        buton.click();
    }
}
function FindPosX(obj) {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) {
            curleft += obj.offsetLeft;
            if(!obj.offsetParent)
            break;
            obj = obj.offsetParent;
        }
    else
        if(obj.x)
            curleft += obj.x;
    return curleft;
}
function FindPosY(obj) { 
    var curtop = 0; 
    if(obj.offsetParent)
        while(1) { 
            curtop += obj.offsetTop; 
            if(!obj.offsetParent) 
            break; 
            obj = obj.offsetParent; 
        } 
    else
        if(obj.y) 
            curtop += obj.y; 
    return curtop; 
}

