function clrTxt(controlid, textDefault) {
    if (document.getElementById(controlid).value == textDefault) {
        document.getElementById(controlid).value = "";
    }
}

function LUNCheck(src, arg) {

    number = arg.Value;

    var i, sum, weight;
    sum = 0;
    for (i = 0; i < number.length - 1; i++) {
        weight = number.substr(number.length - (i + 2), 1) * (2 - (i % 2));
        sum += ((weight < 10) ? weight : (weight - 9));
    }

    if (parseInt(number.substr(number.length - 1)) == ((10 - sum % 10) % 10)) {
        arg.IsValid = true;

    } else {

        //alert("Invalid card number");

        arg.IsValid = false;
    }

}

function mostraNascondi(controlid) {

    var cssclass;
    cssclass = document.getElementById(controlid).className;
    //alert(cssclass);

    if (cssclass == 'hidden')
    {
        document.getElementById(controlid).className = '';
       

    } else {
        document.getElementById(controlid).className = 'hidden';
    }




}


function mostraChild(feedid) {

    var parent;
    var child;
    
    parent = 'feedParent' + feedid;
    child = 'feedChild' + feedid;
    //alert(controlid);

    document.getElementById(parent).className = 'hidden';
    document.getElementById(child).className = '';


}


function mostraParent(feedid) {

    var parent;
    var child;

    parent = 'feedParent' + feedid;
    child = 'feedChild' + feedid;
    //alert(controlid);

    document.getElementById(parent).className = '';
    document.getElementById(child).className = 'hidden';


}