/////////////////////////////////////////////////////////////////////////////
function getQueryStrings (usersArray)
/////////////////////////////////////////////////////////////////////////////
{
	// Get the string that follows the "?" in the window's location.
	var sGet = window.location.search;
	if (sGet) // if has a value...
	{
		// Drop the leading "?"
		sGet = sGet.substr(1);

		// Generate a string array of the name value pairs.
		// Each array element will have the form "foo=bar"
		var sNVPairs = sGet.split("&");

		// Now, for each name-value pair, we need to extract
		// the name and value.
		for (var i = 0; i < sNVPairs.length; i++)
		{
			// So, sNVPairs[i] contains the current element...
			// split it at the equal sign.
			var sNV = sNVPairs[i].split("=");

			// Assign the pair to the GETDATA array.
			var sName = sNV[0];
			var sValue = sNV[1];

			usersArray[sName] = sValue;
			//document.write (sName + " = " + sValue + "<BR>" );
		}
	}
}


/////////////////////////////////////////////////////////////////////////////
function setCookie(c_name,value,expiredays)
/////////////////////////////////////////////////////////////////////////////
{
	var exdate = new Date()
	exdate.setDate(exdate.getDate() + expiredays)
	document.cookie = c_name + "=" + escape(value)+
		((expiredays == null) ? "" : "; expires=" + exdate.toGMTString())
}

/////////////////////////////////////////////////////////////////////////////
function getCookie(c_name)
/////////////////////////////////////////////////////////////////////////////
{
	if (document.cookie.length>0)
	{
	//document.write ("COOKIE STRING: " + document.cookie + "<br>");
		c_start=document.cookie.indexOf(c_name + "=")
		if (c_start!=-1)
		{
			c_start=c_start + c_name.length+1
			c_end=document.cookie.indexOf(";",c_start)
			
			if (c_end==-1) c_end=document.cookie.length
			{
				//Get cookie and replace any plus signs with spaces !!
				cstr = unescape(document.cookie.substring(c_start,c_end))
				//cstr = document.cookie.substring(c_start,c_end)
				return cstr.replace(/\+/g, " ");
			}
		}
	}
	return ""
}

/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
