// csm.js

// Form Input Generation Function

function getTextInput(inputName, valueText) {
    //alert("Creating input... ");
    if(!valueText)
        valueText = '';
    if(navigator.org == 'netscape' && navigator.version < 5 && navigator.OS != 'mac') {
        inputCode = '<input type="text" size="10" name="' + inputName + '" maxlength="2047" value=" ' + valueText + '" id="' + inputName + '" onfocus="getFocus(this)" onblur="blurIt(this)">';
    }
    else if(document.all) {
        inputCode = '<input type="text" size="19" name="' + inputName + '" maxlength="2047" value="' + valueText + '" id="' + inputName + '" onfocus="getFocus(this)" onblur="blurIt(this)">';
    }
    else if(navigator.family == "gecko" && navigator.OS == "mac") {
        inputCode = '<input type="text" size="19" name="' + inputName + '" maxlength="2047" value="' + valueText + '" id="' + inputName + '" onfocus="getFocus(this)" onblur="blurIt(this)">';
    }
    else if(navigator.family == 'netscape' && navigator.version <5 && navigator.OS == 'mac') {
        inputCode = '<input type="text" size="20" name="' + inputName + '" maxlength="2047" value="' + valueText + '" id="' + inputName + '" onfocus="getFocus(this)" onblur="blurIt(this)">';
    }
    else {
        //alert("Something else!");
        inputCode = '<input type="text" size="23" name="' + inputName + '" maxlength="2047" value="' + valueText + '" id="' + inputName + '" onfocus="getFocus(this)" onblur="blurIt(this)">';
    }

    //alert(inputCode);

    return inputCode;
}

function getFocus(target) {
    if(target.style) {
        target.style.backgroundColor = "white";
        target.style.borderColor = "#468";
    }
}

function blurIt(target) {
    if(target.style) {
        target.style.backgroundColor = "#BCD";
        target.style.borderColor = "white";
    }
}