
function SetCookie( pName, pValue, pPath, pDomain, pSecure, pExpires )
 {
	document.cookie = escape(pName) + '=' + escape(pValue)
					+ ( pExpires ? '; expires=' + pExpires : '' )
					+ ( pPath ? '; path=' + pPath : '' )
					+ ( pDomain ? '; domain=' + pDomain : '' )
					+ ( pSecure ? '; secure' : '' );
 }

function GetCookie(pName)
 {
	var name_escape = escape(pName);
	var offset = document.cookie.indexOf( name_escape + '=' );
	
	if( offset == -1 ) return false;
	else
	 {
		var end = document.cookie.indexOf( ';', offset + name_escape.length );
		if( end == -1 ) end = document.cookie.length;
	 }
	
	return unescape( document.cookie.substring( offset + name_escape.length + 1, end ) );
 }

function DelCookie(pName)
 {
	SetCookie( pName, '' );
 }
