function init_guiSelect(a) {
	if (Info.browser.isIEpre6 || Info.browser.isSafari || Info.browser.isChrome) {
		return
	}
	var c = 0;
	a = a || GuiSelect_DefaultTransformer;
	if ($("content-zone")) {
		$A($("content-zone").getElementsByTagName("select"))
				.each(
						function(o) {
							o = $(o);
							if (o.hasClassName("gui-select")) {
								var e = document.createElement("div");
								e.id = o.id;
								e.className = "gui-select";
								var s = $A(o.getElementsByTagName("option"));
								var k = o.selectedIndex;
								var l = "title";
								var p = a.replaceTitle(s[k].text);
								var h = '<p class="' + l
										+ '" style="padding:0px;"><a href="#">'
										+ p
										+ '</a></p><input type="hidden" name="'
										+ o.name + '" value="' + o.value
										+ '" /><div class="content"><ul>';
								s.each(function(t) {
									var u = a.replaceOption(t.innerHTML);
									h += '<li><span class="value">' + t.value
											+ '</span><a href="#">' + u
											+ "</a></li>"
								});
								h += "</ul></div>";
								e.innerHTML = h;
								o.parentNode.replaceChild(e, o);
								e = $(e);
								var f = e.up("form");
								var n = e.down("input");
								var i = e.down("div.content");
								var r = e.down("ul");
								var j = new GuiSelectLayer(e.down("div"));
								var g = e.down("a");
								g.observe("focus", function() {
									j.open()
								});
								g.observe("click", function(t) {
									if (j._state == "open") {
										j.close()
									} else {
										if (j._state == "closed") {
											j.open()
										}
									}
									Event.stop(t)
								});
								$A(r.getElementsByTagName("a"))
										.each(
												function(t) {
													t = $(t);
													t
															.observe(
																	"focus",
																	function(u) {
																		if (j != Layer.current) {
																			j
																					.open();
																			if (j.scrollbar) {
																				j.scrollbar
																						.scrollIntoView(t
																								.up("li"))
																			}
																		}
																		n.value = this
																				.previous("span.value").innerHTML;
																		this
																				.up(
																						"div",
																						1)
																				.down(
																						".title")
																				.down(
																						"a").innerHTML = this.innerHTML;
																		j
																				.close();
																		Event
																				.stop(u)
																	}.bind(t))
												});
								if (r.getHeight() <= i.getHeight()) {
									i.style.height = "auto"
								} else {
									c++;
									var d = document.createElement("div");
									d.className = "slider-wrapper";
									d.innerHTML = '<div class="arrow-up"></div><div class="slider" id="slider'
											+ c
											+ '"><div class="handle" id="handle'
											+ c
											+ '"></div></div><div class="arrow-down"></div>';
									i.appendChild(d);
									j.scrollbar = new GuiScrollbar(
											"handle" + c, "slider" + c, j);
									var m = d.childElements();
									m[0].observe("click", function() {
										j.scrollbar.moveUp()
									});
									m[2].observe("click", function() {
										j.scrollbar.moveDown()
									});
									var q = (Info.browser.isIE) ? "activate"
											: "focus";
									$A(e.down("ul").getElementsByTagName("a"))
											.each(
													function(t) {
														$(t)
																.observe(
																		q,
																		function(
																				u) {
																			j.scrollbar
																					.scrollIntoView($(
																							this)
																							.up(
																									"li"))
																		}
																				.bind(t))
													})
								}
							}
						})
	}
	var b = new MouseWheelObserver;
	b.register(function(d) {
		if (Layer.current && Layer.current.onmousescroll
				&& Layer.current.scrollbar) {
			return Layer.current.onmousescroll(d)
		} else {
			return true
		}
	})
}
GuiSelect_DefaultTransformer = {
	replaceOption : Prototype.K,
	replaceTitle : Prototype.K
};
GuiSelect_SearchTransformer = {
	getMatches : function(a) {
		return /^(.+)\s(\([^)]+\))$/.exec(a)
	},
	replaceOption : function(b) {
		var a = this.getMatches(b);
		return (a) ? a[1] + ' <span class="no">' + a[2] + "</span>" : b
	},
	replaceTitle : function(b) {
		var a = this.getMatches(b);
		return (a) ? a[1] : b
	}
};
var GuiSelectLayer = Class.create();
GuiSelectLayer.prototype = Object.extend(new Layer, {
	list : null,
	scrollbar : null,
	_state : "closed",
	initialize : function(b, a) {
		this.initSuper(b, a);
		this.list = this.node.down("ul")
	},
	afterClose : function() {
		this.node.up().removeClassName("active-gui-select");
		this._state = "closed"
	},
	afterOpen : function() {
		window.setTimeout(function() {
			this._state = "open"
		}.bind(this), 200)
	},
	beforeOpen : function() {
		this._state = "opening";
		this.node.up().addClassName("active-gui-select");
		if (this.scrollbar) {
			this.scrollbar.setValue(0)
		}
		return true
	},
	hide : function() {
		this.node.removeClassName("active-content")
	},
	jumpTo : function(a) {
	},
	onkeypress : function(c) {
		var b = c.keyCode;
		if (Info.browser.isOpera) {
			return
		}
		if (b == Event.KEY_UP) {
			this.scrollbar.moveUp();
			Event.stop(c)
		} else {
			if (b == Event.KEY_DOWN) {
				this.scrollbar.moveDown();
				Event.stop(c)
			} else {
				if (b == Event.KEY_PAGEUP) {
					this.scrollbar.pageUp();
					Event.stop(c)
				} else {
					if (b == Event.KEY_PAGEDOWN) {
						this.scrollbar.pageDown();
						Event.stop(c)
					} else {
						if (b == Event.KEY_HOME) {
							this.scrollbar.pageHome();
							Event.stop(c)
						} else {
							if (b == Event.KEY_END) {
								this.scrollbar.pageEnd();
								Event.stop(c)
							}
						}
					}
				}
			}
		}
		var a = String.fromCharCode(c.charCode);
		if (/[a-zA-Z0-9]/.test(a)) {
			this.jumpTo(a)
		}
	},
	onmousescroll : function(a) {
		if (a < 0) {
			this.scrollbar.moveUp()
		} else {
			if (a > 0) {
				this.scrollbar.moveDown()
			}
		}
		return false
	},
	scrollTo : function(a) {
		this.list.style.top = a + "px"
	},
	show : function() {
		this.node.addClassName("active-content")
	}
});
var GuiScrollbar = Class.create();
GuiScrollbar.prototype = {
	initialize : function(c, b, a) {
		this.outerHeight = a.node.getHeight();
		this.innerHeight = a.node.down("ul").getHeight();
		this.maxScroll = this.innerHeight - this.outerHeight;
		this.itemHeight = a.node.down("li").getHeight();
		this.sliderHeight = $(b).getHeight();
		$(c).style.height = Math.round(this.sliderHeight * this.outerHeight
				/ this.innerHeight)
				+ "px";
		this.slider = new Control.Slider(c, b, {
			axis : "vertical",
			range : $R(0, this.maxScroll),
			onSlide : function(d) {
				a.scrollTo(-d)
			},
			onChange : function(d) {
				a.scrollTo(-d)
			}
		})
	},
	moveDown : function() {
		this.setValue(this.slider.value + this.itemHeight)
	},
	moveUp : function() {
		this.setValue(this.slider.value - this.itemHeight)
	},
	pageDown : function() {
		this.setValue(this.slider.value + this.outerHeight)
	},
	pageEnd : function() {
		this.setValue(this.maxScroll)
	},
	pageHome : function() {
		this.setValue(0)
	},
	pageUp : function() {
		this.setValue(this.slider.value - this.outerHeight)
	},
	scrollIntoView : function(d) {
		var c = d.offsetTop;
		var a = this.slider.value;
		var b = a + this.outerHeight;
		if (c + this.itemHeight > b) {
			this.setValue(c + this.itemHeight - this.outerHeight)
		} else {
			if (c < a) {
				this.setValue(c)
			}
		}
	},
	setValue : function(a) {
		this.slider.setValue(a)
	}
};