function submitForm() {
    tinyMCE.triggerSave();
}

function trim(stringToTrim) {
    return stringToTrim.replace(/^\s+|\s+$/g,"");
}

function validate(frmName) {
    var elem = document.getElementById(frmName).elements;
    
    submitForm();
    
    for(var i = 0; i < (elem.length - 1); i++) {
        if(trim(elem[i].value) == "") {
            alert ("Please enter a value for: " + elem[i].name + ".");
            elem[i].focus();
            return false;
        }
    }
    return true;
}

function doClear(theText) {
     if (theText.value == theText.defaultValue) {
         theText.value = "";
     }
     
     return;
}

