How to rewrite the saveData function

Here is the function that is called after hitting the save button:

{geshibot lang="javascript" head="saveData"}flashblocks.saveData = function () {
   TXTSEP = "\t";
    OBJSEP = "\r";

    mod.msg.text = lng.saving;
    dark._visible = true;
    mod._visible = true;
    var theData = "";
    for (n=0; n<storeData.length; n++) {
        var dataLine = "";
        if (n>0) {
            dataLine += OBJSEP;
        }
        dataLine += String(storeData[n].id)+TXTSEP;
        dataLine += String(storeData[n].mc)+TXTSEP;
        dataLine += String(storeData[n].objType)+TXTSEP;
        dataLine += String(storeData[n].link)+TXTSEP;
        dataLine += String(storeData[n].param)+TXTSEP;
        dataLine += String(storeData[n].theContent);
        theData += dataLine;
        // trace("save: "+dataLine);
        // 0   id  1 mc  2 objType   3 link  4 param   5   theContent;
    }
    result_lv = new LoadVars();
    result_lv.onLoad = function(success) {
        if (success) {
            startSaveDone(this.writing);
        } else {
            mod.msg.text = lng.error_server;
        }
    };
    //
    send_lv = new LoadVars();
    send_lv.theData = theData;
    send_lv.theFile = mod.dataFile.text;
    send_lv.sendAndLoad(config.flashblocks_path+config.flashblocks_saveData_file, result_lv, "POST");
};{/geshibot}