

function CookieMonster( swfObject, doc, gmt )
{
	this.gmt = gmt;
	this.targetDoc = (doc ? doc : document);
	this.so = swfObject;
	//this.get('testvariable');
}


 	
CookieMonster.prototype = {

	set: function( key, val, dur )
	{
		//if (!document.cookie) return 0;
		document.cookie = key + "=" + escape(val) + "; expires= " + this.gmt + "; path=/";
		return 1;
	},
	
	get: function ( key )
	{
		var a = document.cookie;
		var start = a.search(key+"=");
		var part = a.substring(start + key.length + 1, a.length);
		var end = part.search(";");
		return unescape(part.substring(0, end == -1 ? a.length : end));
	},
	
	accepted: function ()
	{
		this.set( "welcome", this.gmt );
		return( this.get("welcome") == this.gmt ? "1" : "0" );
	}
}
