function fillfieldfromsample(a,name)
{
    txtObj = document.getElementById(name);
    if (txtObj != null)
    {
        txtObj.value=(a.innerText?a.innerText:a.firstChild.nodeValue).replace(/&amp;/g,"&").replace(/&quot;/g,'"');
        txtObj.focus()
    }
}

function fillsamplefromfield(a,name)
{

    txtObj = document.getElementById(name);
    if (txtObj != null)
    {
        if(document.all){
            txtObj.innerText=(a.value).replace(/&amp;/g,"&").replace(/&quot;/g,'"');
        } else{
            txtObj.textContent=(a.value).replace(/&amp;/g,"&").replace(/&quot;/g,'"');
        }
    }
}

function fillfieldfromfield(a,name)
{
    txtObj = document.getElementById(name);
    if ((txtObj != null)&&(txtObj.value==""))
    {
        txtObj.value=(a.value).replace(/&amp;/g,"&").replace(/&quot;/g,'"');
        txtObj.focus()
    }
}

function fillddlistfromsample(a,name)
{
    ddlObj = document.getElementById(name);
    if ((ddlObj != null)&&(ddlObj.value==""))
    {
        var nValue = (a.innerText?a.innerText:a.firstChild.nodeValue).replace(/&amp;/g,"&").replace(/&quot;/g,'"');
        for (i=0; i<ddlObj.length; i++)
            if (ddlObj.options[i].text == nValue)
                ddlObj.options[i].selected = true;
        ddlObj.focus()
    }
}

function objectShow(name)
{
    var obj = document.getElementById(name);
    obj.style.display = "";
}

function objectHide(name)
{
    var obj = document.getElementById(name);
    obj.style.display = "none";
}
