
	var b_base = null;
	var b_panel = null;
	var b_point = 0;
	var b_max = 255;
	var b_top = -280;
	var b_open = false;
	var b_flag = true;
	var b_time = null;
	
	function banner_load(opened) {
		b_base = document.getElementById("banner_base");
		b_panel = document.getElementById("banner_panel");
		
		if (b_base != null && b_panel != null) {
			b_base.onmouseout = function(trgEvent) {
				var evt = trgEvent == null ? event : trgEvent;
				var target = evt.toElement == null ? evt.relatedTarget : evt.toElement;
				
				while (target != null && target != this) target = target.parentNode;
				
				if (target == null) {
					if (b_time != null) clearTimeout(b_time);
					b_time = setTimeout("banner_close()", 4000);
				}
			}
			b_base.onmouseover = function() {
				if (b_time != null) clearTimeout(b_time);
				b_open = true;
			}
			b_panel.onmouseover = function() {
				if (b_time != null) clearTimeout(b_time);
				b_open = true;
			}
			
			if (opened) {
				b_panel.style.display = "none";
				b_open = true;
			}
			
			banner_run();
		}
	}
	
	function banner_run() {
		if (b_flag) {
			b_flag = false;
			if (b_base != null) {	
				if (b_open) {
					if (b_point < b_max) {
						b_point += 10;
						if (b_point >= b_max) {
							b_point = b_max;
							
							if (b_time != null) clearTimeout(b_time);
							b_time = setTimeout("banner_close()", 10000);
						}
						
						b_base.style.top = (b_top + b_point) + "px";
					}
				} else {
					if (b_point > 0) {
						b_point += -10;
						if (b_point <= 0) {
							b_point = 0;
							
							b_panel.style.display = "block";
						}
						
						b_base.style.top = (b_top + b_point) + "px";
					}
				}
			}
			
			b_flag = true;
			setTimeout("banner_run()", 10);
		}
	}
	
	function banner_close_force() {
		if (b_time != null) clearTimeout(b_time);
		b_open = false;
		b_point = 0;
		b_base.style.top = (b_top + b_point) + "px";
		b_panel.style.display = "block";
	}
	
	function banner_close() {
		b_open = false;
	}

