var Sponsors_class = function(){
    this.win = null;
    this.parameters ="";
    this.sponsors_id ="";
    this.lang = '';
}

Sponsors_class.prototype = {
	
    onLoad:function()
    {
        this.lang = InitObj.getLanguage();
        this.init();
        //showDebug();
    }
    ,
    setLang:function(lang)
    {
        this.lang = lang;
    }
    ,
    setParameters:function(parameters)
    {
        this.parameters = parameters;
    }
    ,
    setSponsorsId:function(id)
    {
        this.sponsors_id = id;
    }
    ,
    init:function()
    {
    
    	var obj = this;
        var search_arr = String(window.location.search).split("&");
        new Ajax.Request(InitObj.getRootPath()+InitObj.getActionsPath()+"Sponsors/list.php",
        {
            method: 'get',
            parameters:
            {
                sponsors_id:obj.sponsors_id,
                params: obj.parameters,
                html_root: InitObj.getRootPath(),
                lang:obj.lang
            },
            onSuccess: function(transport)
            {
                $("exist_sponsors").innerHTML = transport.responseText.trim();
            },
            onFailure: function(transport) 
            {
                alert('Something wrong, please try again.');
            }
        });
    }
}

var Sponsors = new Sponsors_class();
InitObj.addOnLoadObject(Sponsors);    
