/*
	This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/
//$().ready(function(){
var RSSClient = {
	Proxy: "",
	RSS: "",
	ContentType: "text/xml",
	CharSet: "utf-8",
	ResponseXML: null,
	ResponseText: "",
	Status: 0,
	ContentLength: 0,
	SendRequest : function(callback){
		if(!!RSSClient.Proxy) {
			RSSClient.ResponseText = "";
			RSSClient.ResponseXML = null;
			RSSClient.Status = 0;
			
			var content = "";
			RSSClient.ContentLength = content.length;
			
			function getResponse(xData) {
				if(!!callback) {
					var jsOut = $.xmlToJSON($.textToXML(xData)); 
					callback(jsOut);
				}
			}
			RSSClient.Proxy += (RSSClient.Proxy.match(/\?/) ? "&" : "?") +'callback=?'; 
			var data = {Method:"POST",Content_Length:RSSClient.ContentLength,SOAPServer:RSSClient.RSS,content:content,content_type:"text/xml"}; 
			$.ajax({
			type: "GET",
			url: RSSClient.Proxy,
			data: data,
			success: getResponse,
			error: function(a,b,c){alert(a+b+c);},
			dataType: "json"
			});
		}
	}
}; 
//});