
function GecoFormSubmit(){
    this.action = null;
    this.target = "_self";
    this.params = new Array();  
    this.method = "get";
    
    this.innerForm = document.createElement("form");
    this.innerForm.style.display = "none";
    document.body.appendChild(this.innerForm);
    

    this.addParameter = _ds_addParameter;
    this.getParameter = _ds_getParameter;
    
    this.setAction = _ds_setAction;
    this.getAction = _ds_getAction;

    this.setTarget = _ds_setTarget;
    this.getTarget = _ds_getTarget;

    this.setMethod = _ds_setMethod;
    this.getMethod = _ds_getMethod;

    this.submit = _ds_submit;
}

function _ds_submit(){
 
    var myform = this.innerForm;
    var myparams = this.params;
    myform.setAttribute("action", this.getAction());
    myform.setAttribute("method", this.getMethod());
    myform.setAttribute("target", this.getTarget());

    for(var i in myparams){
        var localInput = document.createElement("INPUT");
        localInput.setAttribute("name", i);
        localInput.setAttribute("value", myparams[i]);
        localInput.setAttribute("type", "hidden");
        myform.appendChild(localInput);
    }
    myform.submit();
}

function _ds_addParameter(name, value){
    this.params[name] = value;
}
function _ds_getParameter(name){
    return this.params[name];
}

function _ds_setAction(value){
    this.action = value;
}
function _ds_getAction(){
    return this.action;
}
function _ds_setTarget(value){
    this.target = value;
}
function _ds_getTarget(){
    return this.target;
}
function _ds_setMethod(value){
    this.method = value;
}
function _ds_getMethod(){
    return this.method;
}
