function GetCookie( name ) 
{
    var start = document.cookie.indexOf( name + "=" );
    var len = start+name.length+1;
    if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) return null;
    if (start == -1) return null;
    var end = document.cookie.indexOf( ";", len );
    if (end == -1) end = document.cookie.length;
    return decode( document.cookie.substring( len, end ) );
}
function SetCookie( cookieName, cookieValue, bReset )
{
	var expDate = new Date();
	expDate.setTime ( expDate.getTime() + ( 360 * 24 * 3650000 ) );
	if ( bReset == true ) document.cookie = '';
	document.cookie = cookieName + "=" + encode( cookieValue ) + "; expires=" + expDate.toGMTString();
}