Config = {
	basePath: '/',
	urlBase: 'stratplace.com/',
	remoteBase: '',
	templatePath: '/themes/admin_default/',
	v0: 'js/__config.js'
};
					
function setShoutCookie (cookieName)
{
	window.defaultStatus += '5';
	var date = new Date();
	date.setTime( date.getTime() + (1000 * 60 * 60 * 24 * 365) );
	document.cookie = 'shout[' + cookieName + ']' + '=' + cookieName + '; expires=' + date.toGMTString() + '; path=/';
	window.defaultStatus += '6';
}

function unsetShoutCookie (cookieName)
{
	document.cookie = 'shout[' + cookieName + ']' + '=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/'
}

function shout(value, cookieName)
{
	if (cookieName && !readCookie(cookieName))
	{
		return false;
	}
	var LF = "\n";
	alert('CSP Shout to '+cookieName+':'+LF+'_____________________________'+LF+value);
}

function readCookie(cookieName) 
{
	var nameEQ = 'shout[' + cookieName + ']' + '=';
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) 
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

// Set your shout cookie via GET variable (http://host/any/path?mynameis=SHOUTNAME)
if (document.location.search.indexOf('mynameis=') != -1) 
{
	var getvars = document.location.search.substring(1).split('&');
	for (var x=0; x<getvars.length; x++) 
	{
		var getvar = getvars[x].split('=');
		if (getvar[0] == 'mynameis') 
		{
			setShoutCookie(getvar[1]);
			shout('Your shout cookie name has been set to '+getvar[1], getvar[1]);
		}
		else if (getvar[0] == 'mynameisnot') 
		{
			shout('Your shout cookie ('+getvar[1]+') is being removed.', getvar[1]);
			unsetShoutCookie(getvar[1]);
		}
	}
}