/*
 * Copyright (c) 1995-2011 by 4system Polska Sp. z o.o.
 * All Rights Reserved. v4
 */

function SuspendData()
{
	this.items = new Array();
};

SuspendData.prototype.setFromString = function(d)
{
	this.items = new Array();
	if (d && d != "") {
		arr = d.split(";");
		for (var i = 0; i < arr.length; i++) {
			var n = arr[i].slice(0, arr[i].indexOf( '=' ));
			var v = arr[i].slice(arr[i].indexOf( '=' ) + 1);
			if (n != "") this.items[n] = v.replace(/%3B/gi, ";");
		}
	}
};

SuspendData.prototype.getToString = function()
{
	var out = "";
	for (var k in this.items) {
		out += k + "=" + this.items[k].toString().replace(/\|/g, "%3B") + ";";
	}
	return out;
};

SuspendData.prototype.getValue = function(name)
{
	var v = this.items[name];
	return (typeof(v) == "undefined") ? null:v;
};

SuspendData.prototype.setValue = function(name, value)
{	
	this.items[name] = value;
};

suspendData = new SuspendData();
