function getCookies() {
	var args = new Array();
	// Get Cookie String
	var query = document.cookie; 
	// Split query at the semicolon.
	var pairs = query.split("; "); 
	
	// Begin loop through the querystring
	var iargs = -1;
	for(var i = 0; i < pairs.length; i++) {

		// Look for "name=value"
		var pos = pairs[i].indexOf('='); 
		// if not found, skip to next
		if (pos == -1) continue; 
		// Extract the name
		var argname = pairs[i].substring(0,pos); 
		
		// Extract the value
		var value = pairs[i].substring(pos+1); 
		// Store as a property
		args[argname] = unescape(value);
	}
	return args; // Return the Object
}

function setCookies(a)
{
	var cookieString = "";
	
	for (key in a)
	{
		document.cookie = key + "=" + escape(a[key]);
	}
}