﻿function childNodeIndex()
{
    var Index;
    if (navigator.appName.toLowerCase() == 'netscape')
        Index = 1;
    else
        Index = 0;

    return Index;
}

function SetUniqueRadioButton(nameregex, current) 
{
    re = new RegExp(nameregex);

    for (i = 0; i < document.forms[0].elements.length; i++) 
    {
        elm = document.forms[0].elements[i]
        if (elm.type == 'radio') 
        {
            if (re.test(elm.name)) 
            {
                elm.checked = false;
            }
        }
    }
    
    current.checked = true;
}

function trim(stringToTrim) 
{
    return stringToTrim.replace(/^\s+|\s+$/g, "");
}

function ltrim(stringToTrim) 
{
    return stringToTrim.replace(/^\s+/, "");
}

function rtrim(stringToTrim) 
{
    return stringToTrim.replace(/\s+$/, "");
}


function validatorFckEditor(src, args)
{
    alert(src);
}