function get_cookie(Name) 
	{
		
		var search = Name+"="	
		var returnvalue = "";
		if (document.cookie.length > 0) {
			offset = document.cookie.indexOf(search)
			if (offset != -1) {
				offset += search.length
				end = document.cookie.indexOf(";", offset);
				if (end == -1) end = document.cookie.length;
				returnvalue=unescape(document.cookie.substring(offset, end));
				
					var a 	=returnvalue.length;
					for(i=0;i<a;i++)
					{
						returnvalue=replace_plus(returnvalue);
					}
			}
		}
		
		return returnvalue;
}
function Delete_Cookie( name, path, domain ) {
if ( Get_Cookie1( name ) ) document.cookie = name + "=" +
( ( path ) ? ";path=" + path : "") +
( ( domain ) ? ";domain=" + domain : "" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
			
function set_cookie ( name, value, exp_y, exp_m, exp_d, path, domain, secure )
{
  var cookie_string = name + "=" + escape ( value );

  if ( exp_y )  {
    var expires = new Date ( exp_y, exp_m, exp_d );
    cookie_string += "; expires=" + expires.toGMTString();
  }

  if ( path )
        cookie_string += "; path=" + escape ( path );

  if ( domain )
        cookie_string += "; domain=" + escape ( domain );
  
  if ( secure )
        cookie_string += "; secure";
  
  document.cookie = cookie_string;
}

function Delete_Cookie( name, path, domain ) {
	if ( get_cookie( name ) ) document.cookie = name + "=" +
	( ( path ) ? ";path=" + path : "") +
	( ( domain ) ? ";domain=" + domain : "" ) +
	";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

function get_cookie_variable(str,pos)
{
	var arr_cookie=str.split("**");
	var name=arr_cookie[pos];
	return name;
}
function replace_plus(text)
{
       return text.replace('+',' ');
}
