
	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 ( cookie_name )
	{
	  var cookie_date = new Date ( );  // current date & time
	  cookie_date.setTime ( cookie_date.getTime() - 1 );
	  document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();
	}

	function thisSection(thisSectionId, thisSectionNumber, thisAction) {
		var mainSection = document.getElementById('s' + thisSectionId);
		if (thisAction=='+') {
			for(var i=1; i<=thisSectionNumber; i++) {
				var thisSection = document.getElementById('s' + i + thisSectionId);
				if (thisSection.style.display=='none') {
					thisSection.style.display = '';
					if (i==1) 
						mainSection.style.display = '';
					break;
				}
			}
			i_cookie = i;
		}
		else {
			for(var i=thisSectionNumber; i>=1; i--) {
				var thisSection = document.getElementById('s' + i + thisSectionId);
				if (thisSection.style.display=='') {
					thisSection.style.display = 'none';
					if (i==1) 
						mainSection.style.display = 'none';
					break;
				}
			}
			i_cookie = i-1;
		}

//		delete_cookie(thisSectionId);
		set_cookie(thisSectionId, i_cookie, 2209, 10, 12);
	}
