function saveUserData(name,text)
{
	if((text!="") && (text!="undefined") && (text!="null") && (text!=undefined) && (text!=null))
		var usrdat = new String(text);
	if((name!="") && (name!="undefined") && (name!="null") && (name!=undefined) && (name!=null))
		setCookie(name, usrdat);
}

function loadUserData(name)
{
	return(new String (getCookie(name)));
}

function setCookie (coknam, value, expires)
{
	if (!expires)
	{
		expires = new Date();
		expires.setTime (expires.getTime() + (1000 * 60 * 60 * 24 * 50000));
	}
	if(document.cookie = coknam + "=" + escape (value) + "; expires=" + expires.toGMTString() + "; path=/")
		return true;
	else
		return false;
	return null;
} 

function getCookie (coknam)
{
	var doccok = document.cookie;
	coknam = coknam + "=";
	var coklen = doccok.length;
	var cokbgn = 0;
	while (cokbgn < coklen)
	{
		var varbgn = cokbgn + coknam.length;
		if (doccok.substring(cokbgn, varbgn) == coknam)
		{
			var varend = doccok.indexOf (";", varbgn);
			if (varend == -1) varend = coklen;
			return unescape(doccok.substring(varbgn, varend));
		}
		cokbgn = doccok.indexOf(" ", cokbgn) + 1;
		if (cokbgn == 0) break;
	}
	return null;
}

