/*
+-----------------------------------------------
+	WeSpace Base Javascript
+-----------------------------------------------
*/
var USERAGENT = navigator.userAgent.toLowerCase(), AJAXFORCE = false, WSConf = {
	Ajax : {
		method : 'post', 
		disabled : false, 
		notfound : '错误: 404\n原因: 您查询的页面不存在或已被删除.'
	}, 
	Drag : {
		mover : true
	}, 
	Plug : {
		masker_id : 'wsbase_plug_masker_id', 
		masker_disabled : false, 
		loader_id : 'wsbase_plug_loader_id', 
		loader_disabled : false, 
		loader_message : '正在传输数据, 请您稍候...', 
		append_id : 'wsbase_plug_append_container', 
		append_sid : 'webase_plug_append_scripthandle', 
		append_char : 'utf-8', 
		append_times : 2
	}, 
	Display : {
		lockxy : false,
		pages_id : 'wsbase_pages_popboxid', 
		dialog_id : 'wsbase_display_dialog_id', 
		dialog_handle : 'wsbase_display_dialog_handle', 
		dialog_subject : '系统窗口', 
		popbox_id : 'wsbase_display_popbox_id', 
		popbox_handle : 'wsbase_display_popbox_handle', 
		popbox_subject : '系统窗口', 
		slider_id : 'wsbase_display_slider_id', 
		slider_handle : null, 
		prompt_id : 'wsbase_display_prompt_id',
		calandar_id : 'wsbase_display_calandar_id', 
		calandar_handle : null,
		category_id : 'wsbase_display_category_id', 
		category_handle : 'wsbase_display_category_handle', 
		category_subject : '请从下面列表中选择', 
		filter_select_disbled : true
	}
}, WSBase = {
	Browser : {
		IE : window.ActiveXObject && USERAGENT.indexOf('msie') != -1 ? true : false, 
		FF : USERAGENT.indexOf('firefox') == -1 ? false : true
	},
	_func : {
		is_object: function(id){
			if (typeof id == 'object'){
				return id;
			} else if (document.getElementById(id)){
				return document.getElementById(id);
			} return false;
		},
		in_array : function(k, v){
			for (var i = 0; i < v.length; i++){
				if (k == v[i]){
					return true;
				}
			} return false;
		}, 
		gethash : function(){
			return new Date().getTime();
		},
		alerter : function(msg){
			if (msg && msg != ''){
				alert(msg);
			}
		},
		focuser : function(theform, field, prompter, promptmsg){
			if (theform && typeof theform == 'object'){
				if (field && field != ''){
					var setFocuser = true; eval('var ebj = theform.' + field); if (typeof ebj == 'object'){
						if (typeof ebj.type == 'undefined'){
							setFocuser = false;
						} else {
							var typenamed = ebj.type.toLowerCase(); if (!this.in_array(typenamed, ['text', 'password', 'select-one', 'textarea'])){
								setFocuser = false;
							}
						}
					} if (setFocuser){
						eval('theform.' + field + '.focus()');
					}
				} if (prompter && promptmsg != ''){
					var obj = this.is_object(prompter + '_prompter'); if (obj){
						WSBase._displayer.prompter(obj, promptmsg);
					}
				}
			}
		},
		checks : function(theform){
			var checkids = '', comma = ''; if (typeof theform != 'object'){
				theform = eval('document.'+theform);
			} if (theform){
				for (var i = 0; i < theform.elements.length; i++){
					if (theform.elements[i].type == 'checkbox' && theform.elements[i].name.substr(theform.elements[i].name.length - 2,2) == '[]'){
						if (theform.elements[i].checked){
							checkids += comma + theform.elements[i].value; comma = ',';
						}
					}
				}
			} return checkids;
		},
		checkall : function(theform){
			var checki = 0, checked = false; if (typeof theform != 'object'){
				theform = eval('document.'+theform);
			} if (theform){
				for (var i = 0; i < theform.elements.length; i++){
					if (theform.elements[i].type == 'checkbox' && theform.elements[i].name.substr(theform.elements[i].name.length - 2,2) == '[]'){ checki++;
						if (checki == 1){
							checked = theform.elements[i].checked ? false : true;
						} theform.elements[i].checked = checked;
					}
				}
			}
		},
		collapsed : function(id, cook){
			var obj = this.is_object(id), classid = 'on'; if (obj){
				if (obj.style.display == 'none'){
					obj.style.display = ''; if (cook){
						this.cookier(id, 0);
					}
				} else {
					classid = 'off'; obj.style.display = 'none'; if (cook){
						this.cookier(id, 1);
					}
				}
			} return classid;
		},
		director : function(uri){
			var url = uri && uri != '' ? uri : window.location.href; url = url.replace(/&amp;/ig, '&'); if (url.indexOf('?') != -1){
				url = url.replace(/&hashid=([0-9]+)/ig, '&hashid=' + this.gethash());
			} window.location.href = url;
		},
		slashes : function(text, strip){
			var results = ''; if (strip){
				results = text.replace(/\"/g, '"');
				results = text.replace(/\'/g, "'");
			} else {
				results = text.replace(/\"/g, '\"');
				results = text.replace(/\'/g, "\'");
				results = text.replace(/\n/g, ' ');
			} return results;
		},
		cookier : function(k, v, h){
			if (k && k != ''){
				var timer = null, cookies = k + '=' + escape(v) + '; path=/'; if (!isNaN(h) && h > 0){
					timer = new Date((new Date()).getTime() + h * 3600 * 1000);
					cookies += '; expires=' + timer.toGMTString();
				} document.cookie = cookies; 
			}
		},
		appender : {
			js : { loopi : 0, loops : [],
				src : function(src){
					if (src && src != '' && !WSBase._func.in_array(src, this.loops)){
						var ow = WSBase._func.is_object(WSConf.Plug.append_id); if (ow){
							var obj = document.createElement('script'); if (obj){ this.loopi++; this.loops.push(src);
								obj.id = WSConf.Plug.append_id + '_' + this.loopi;
								obj.type = 'text/javascript';
								try{
									obj.src = src;
								} catch (err){
								} ow.appendChild(obj);
							}
						}
					}
				},
				txt : function(txt){
					var ow = WSBase._func.is_object(WSConf.Plug.append_id); if (ow){
						var obj = document.createElement('script'); if (obj){ this.loopi++;
							obj.id = WSConf.Plug.append_id + '_' + this.loopi;
							obj.type = 'text/javascript';
							try{
								obj.text = txt;
							} catch (err){
							} ow.appendChild(obj);
						}
					}
				}
			},
			div : function(id, css, idx){
				var ow = WSBase._func.is_object(WSConf.Plug.append_id); if (ow){
					var oe = WSBase._func.is_object(id); if (oe){
						return true;
					} var obj = obj = document.createElement('div'); if (obj){
						obj.id = id;
						obj.style.top = '0px';
						obj.style.left = '0px';
						obj.style.display = 'none';
						obj.style.position = 'absolute';
						if (css && css != ''){
							obj.className = css;
						} if (idx && !isNaN(idx)){
							obj.style.zIndex = parseInt(idx);
						} ow.appendChild(obj); return true;
					}
				} return false;
			}
		}, 
		evaler : {
			_timer_tmp : '', 
			_timer_handle : null, 
			js : function(txt){
				if (txt.indexOf('script') == -1){
					return true;
				} var loop = 0, tmps = '', srcs = [], srcp = /<script[^\>]*?src=\"([^\>]*?)\"[^\>]*?>[^\>]*?<\/script>/ig; while (srcs = srcp.exec(txt)){ loop++;
					WSBase._func.appender.js.src(srcs[1]);
				} tmps = txt.replace(srcp, ''); if (loop > 0){
					this._timer_tmp = tmps;
					this._timer_handle = setInterval('WSBase._func.evaler.jstxt()', loop * 300);
					return true;
				} else {
					this.jstxt(tmps);
				}
			}, 
			jstxt : function(txt){
				if (this._timer_handle != null){
					clearInterval(this._timer_handle);
					this._timer_handle = null;
					var txt = this._timer_tmp; this._timer_tmp = '';
				} if (txt != ''){
					var results = new Array(), pattern = /<script(.*?)>([^\x00]+?)<\/script>/ig; while(results = pattern.exec(txt)) {
						WSBase._func.appender.js.txt(results[2]);
					}
				}
			}
		}, 
		secimage : function(formname, results){
			var theform = eval('document.' + formname), obj = WSBase._func.is_object(formname + '_secimage'); if (obj && theform.formhash){
				var url = obj.src.replace(/formhash\=(.*)/ig, ''); if (url.indexOf('?') == -1){
					url += '?';
				} if (results){
					theform.formhash.value = results; obj.src = url + 'formhash=' + results;
				} else {
					var abj = WSBase._func.is_object('ajaxform'); if (abj){
						abj.src = url + 'formname=' + formname + '&hashid=' + WSBase._func.gethash();
					}
				}
			}
		}
	},
	_drager : {
		posxy : [],
		mover : function(obj,evt,action){ evt = evt ? evt : window.event;
			if (action == 'active'){
				this.posxy = [
					evt.clientX, 
					evt.clientY, 
					parseInt(obj.style.left), 
					parseInt(obj.style.top)
				]; document.onmousemove = function(evt) {
					try{
						WSBase._drager.mover(obj, evt, 'mover');
					} catch(err) {
					}
				}; document.onmouseup = function(evt) {
					try{
						WSBase._drager.mover(obj, evt, 'locker');
					} catch(err) {
					}
				}; WSBase._drager.doane(evt);
			} else if (action == 'mover') {
				var NewXY = [
					evt.clientX, 
					evt.clientY
				], LmtXY = [
					document.body.clientWidth - parseInt(obj.offsetWidth), 
					(document.body.clientHeight >= document.documentElement.clientHeight ? document.body.clientHeight : document.documentElement.clientHeight) - parseInt(obj.offsetHeight)
				], SetXY = [
					this.posxy[2] + NewXY[0] - this.posxy[0], 
					this.posxy[3] + NewXY[1] - this.posxy[1]
				]; if (SetXY[0] < 0){
					SetXY[0] = 0;
				} else if (SetXY[0] > LmtXY[0]) {
					SetXY[0] = LmtXY[0];
				} if (SetXY[1] < 0){
					SetXY[1] = 0;
				} obj.style.left = SetXY[0] + 'px'; obj.style.top = SetXY[1] + 'px';
				WSBase._drager.doane(evt);
			} else if (action == 'locker') {
				this.posxy = [];
				document.onmousemove = null;
				document.onmouseup = null;
			}
		},
		doane : function(evt){ evt = evt ? evt : window.event;
			if(evt) {
				if(WSBase.Browser.IE) {
					evt.returnValue = false;
					evt.cancelBubble = true;
				} else if(evt) {
					evt.stopPropagation();
					evt.preventDefault();
				}
			}
		}
	},
	_plugins : {
		masker : function(isClose){
			WSBase._displayer.prompter(false, false, true); if (WSConf.Plug.masker_disabled){
				return true;
			} var obj = WSBase._func.is_object(WSConf.Plug.masker_id); if (isClose){
				if (obj){
					var op = WSBase._func.is_object(WSConf.Display.popbox_id), od = WSBase._func.is_object(WSConf.Display.dialog_id); if (op && op.style.display != 'none'){
						return false;
					} else if (od && od.style.display != 'none'){
						return false;
					} obj.style.display = 'none';
				}
			} else {
				if (!obj){
					for (var i = 0; i < WSConf.Plug.append_times; i++){
						if (WSBase._func.appender.div(WSConf.Plug.masker_id, 'wsbase_opacity wsbase_masker', 10)){
							obj = WSBase._func.is_object(WSConf.Plug.masker_id); break;
						}
					}
				} if (obj) {
					var W = Math.max(document.body.clientWidth, document.documentElement.clientWidth), H = Math.max(document.body.clientHeight, document.documentElement.clientHeight);
					obj.style.display = ''; obj.style.width = W + 'px'; obj.style.height = H + 'px';
				}
			}
		},
		loader : function(isClose, msg){
			if (WSConf.Plug.loader_disabled){
				return true;
			} var obj = WSBase._func.is_object(WSConf.Plug.loader_id); if (isClose){
				if (obj){
					obj.style.display = 'none';
				}
			} else {
				if (!obj){
					for (var i = 0; i < WSConf.Plug.append_times; i++){
						if (WSBase._func.appender.div(WSConf.Plug.loader_id, 'wsbase_loader', 30)){
							obj = WSBase._func.is_object(WSConf.Plug.loader_id); break;
						}
					}
				} if (obj){
					var W = Math.max(document.body.clientWidth, document.documentElement.clientWidth), H = Math.max(document.body.clientHeight, document.documentElement.clientHeight), T = Math.max(document.body.scrollTop, document.documentElement.scrollTop); obj.innerHTML = msg && msg != '' ? msg : WSConf.Plug.loader_message; obj.style.display = ''; 
					var D = {w : parseInt(obj.offsetWidth), h : parseInt(obj.offsetHeight), s : document.documentElement.clientHeight};
					var results = {
						x : parseInt((W - D.w) / 2), 
						y : parseInt(T + (D.s/ 3))
					}; obj.style.top = results.y + 'px'; obj.style.left = results.x + 'px';
				}
			}
		}
	},
	_displayer : {
		_init : {
			sldxy : function(o){
				var results = {w : 0, h : 0, x : 0, y : 0}, obj = WSBase._func.is_object(o); if (obj){
					results = {
						w : parseInt(obj.offsetWidth), 
						h : parseInt(obj.offsetHeight), 
						x : parseInt(obj.offsetLeft), 
						y : parseInt(obj.offsetTop)
					}; while ((obj = obj.offsetParent) != null){
						results.x += parseInt(obj.offsetLeft);
						results.y += parseInt(obj.offsetTop);
					}
				} return results;
			},
			sldon : function(w, d, text, force, isauto){ d.innerHTML = text; d.style.position = 'absolute'; d.style.display = ''; 
				var _T_ = this.sldxy(w), _F_ = this.sldxy(d), W = Math.max(document.documentElement.clientWidth, document.body.clientWidth), H = Math.max(document.documentElement.clientHeight, document.body.clientHeight), T = Math.max(document.documentElement.scrollTop, document.body.scrollTop), E = document.documentElement.clientHeight, results = {w : 0, h : 0, x : 0, y : 0}; 
				var overflow = false, prex = 32, _th_ = (_T_.y - T), _bh_ = (E - (_T_.y - T) - _T_.h); if (_bh_ > _F_.h){
					results.y = _T_.y + _T_.h;
				} else if (_th_ > _F_.h){
					results.y = _T_.y - _F_.h;
				} else {
					overflow = true; if (_bh_ > _th_){
						results.h = _bh_;
						results.y = _T_.y + _T_.h;
					} else {
						results.h = _th_;
						results.y = T;
					}
				} if (overflow) {
					results.w = _F_.w + prex; if (_T_.w > results.w){
						results.w = _T_.w;
					}
				} else {
					if (!isauto){
						if (_T_.w > _F_.w || force){
							results.w = _T_.w;
						} 
					}
					
				} if ((_T_.x + _F_.w) > W && ((_T_.x + _T_.w) > _F_.w)){
					results.x = _T_.x + _T_.w - _F_.w;
				} else {
					results.x = _T_.x;
				} d.style.top = results.y + 'px'; d.style.left = results.x + 'px'; if (results.w > 0){
					d.style.width = results.w + 'px';
				} if (results.h > 0){
					d.style.height = results.h + 'px';
				} if (overflow) {
					d.style.overflow = 'auto';
				}
			}, 
			sldoff : function(o){
				var obj = WSBase._func.is_object(o); if (obj){
					obj.innerHTML = null;
					obj.style.width = null;
					obj.style.height = null;
					obj.style.display = 'none';
				}
			},
			dlgxy : function(o){
				var W = Math.max(document.body.clientWidth, document.documentElement.clientWidth), H = Math.max(document.body.clientHeight, document.documentElement.clientHeight), T = Math.max(document.body.scrollTop, document.documentElement.scrollTop);
				var D = {w : parseInt(o.offsetWidth), h : parseInt(o.offsetHeight), s : document.documentElement.clientHeight};
				var results = {x : 0, y : 0};
				if (D.h > D.s){
					results.y = T;
				} else {
					results.y = T + ((D.s - D.h) / 2);
				} if (D.w > W){
					results.x = 0;
				} else {
					results.x = (W - D.w) / 2;
				} o.style.top = results.y + 'px'; o.style.left = results.x + 'px'; return true;
			},
			caton : function(o, h, s, m){
				var obj = WSBase._func.is_object(o); if (obj){
					var text = this.border('<div id="' + h + '" class="d_h"><div class="d_h_l">' + s + ' &nbsp;</div><div class="d_h_r"><a href="#" onclick="WSBase._displayer.categoff(); return false"></a></div></div><div class="d_c">' + this.clear(m) + '</div>'); obj.style.display = ''; obj.innerHTML = text;
					var _XY_ = this.dlgxy(obj); if (_XY_){
						WSBase._func.evaler.js(m); 
					}
				}
			},
			dlgon : function(o, h, s, m, isPop){
				var obj = WSBase._func.is_object(o); if (obj){
					var text = this.border('<div id="' + h + '" class="d_h"><div class="d_h_l">' + s + ' &nbsp;</div><div class="d_h_r"><a href="#" onclick="WSBase._displayer.closer(' + (isPop ? 'true' : 'false') + '); return false"></a></div></div><div class="d_c">' + this.clear(m) + '</div>'); obj.style.display = ''; obj.innerHTML = text;
					var _XY_ = this.dlgxy(obj); if (_XY_){
						WSBase._func.evaler.js(m); 
					}
				}
			},
			dlgoff : function(o){
				o.style.display = 'none'; WSBase._plugins.loader(true); WSBase._plugins.masker(true);
			},
			clear : function(text){
				if (text.indexOf('<!--begineajax-->') != -1){
					text = text.replace(/\<\!\-\-begineajax\-\-\>([^\x00]+?)\<\!\-\-finishajax\-\-\>/ig, '');
				} text = text.replace(/<script(.*?)>([^\x00]+?)<\/script>/ig, ''); text = text.replace(/class="form"/ig, 'class="aform"'); text = text.replace(/class="list"/ig, 'class="alist"'); text = text.replace(/class="pages"/ig, 'class="apage"'); return text;
			},
			border : function(text){
				results  = '<table cellpadding="0" cellspacing="0" class="wsbase_border">';
				results += '<tr><td class="wsbd1 wsbase_opacity"></td><td class="wsbd2 wsbase_opacity"></td><td class="wsbd3 wsbase_opacity"></td></tr>';
				results += '<tr><td class="wsbd4 wsbase_opacity"></td><td class="wsbd5">'+ text +'</td><td class="wsbd6 wsbase_opacity"></td></tr>';
				results += '<tr><td class="wsbd7 wsbase_opacity"></td><td class="wsbd8 wsbase_opacity"></td><td class="wsbd9 wsbase_opacity"></td></tr></table>';
				return results;
			}
		},
		altitle : function(sObj, text){
			var obj = WSBase._func.is_object(WSConf.Display.altitle_id); if (!obj){
				for (var i = 0; i < WSConf.Plug.append_times; i++){
					if (WSBase._func.appender.div(WSConf.Display.altitle_id, 'wsbase_altitle', 28)){
						obj = WSBase._func.is_object(WSConf.Display.altitle_id);
						break;
					}
				}
			} if (obj){
				this._init.sldon(sObj, obj, '<div class="ah"></div><div class="ac">' + text + '</div>', false, true);
			}
		},
		slider : function(sObj, text, force){
			var obj = WSBase._func.is_object(WSConf.Display.slider_id); if (!obj){
				for (var i = 0; i < WSConf.Plug.append_times; i++){
					if (WSBase._func.appender.div(WSConf.Display.slider_id, 'wsbase_slider', 23)){
						obj = WSBase._func.is_object(WSConf.Display.slider_id);
						break;
					}
				}
			} if (obj){
				this._init.sldon(sObj, obj, text); obj.onmouseover = function(){
					try{
						if (WSConf.Display.slider_handle != null){
							clearInterval(WSConf.Display.slider_handle);
							WSConf.Display.slider_handle = null;
						}
					} catch(err) { } 
				}; obj.onmouseout = function(){
					try{
						if (WSConf.Display.slider_handle == null){
							WSConf.Display.slider_handle = setInterval('WSBase._displayer.slidoff()', 1000);
						}
					} catch(err) { } 
				}; if (WSConf.Display.slider_handle != null){
					clearInterval(WSConf.Display.slider_handle);
					WSConf.Display.slider_handle = null;
				} WSConf.Display.slider_handle = setInterval('WSBase._displayer.slidoff()', 1000);
			}
		}, 
		slidoff : function(){
			if (WSConf.Display.slider_handle != null){
				clearInterval(WSConf.Display.slider_handle);
				WSConf.Display.slider_handle = null;
			} var obj = WSBase._func.is_object(WSConf.Display.slider_id); if (obj){
				this._init.sldoff(obj);
			}
		},
		calandar : function(sObj, text){
			var obj = WSBase._func.is_object(WSConf.Display.calandar_id); if (!obj){
				for (var i = 0; i < WSConf.Plug.append_times; i++){
					if (WSBase._func.appender.div(WSConf.Display.calandar_id, 'wsbase_calandar', 23)){
						obj = WSBase._func.is_object(WSConf.Display.calandar_id);
						break;
					}
				}
			} if (obj){
				this._init.sldon(sObj, obj, text, false, true); obj.onmouseover = function(){
					try{
						if (WSConf.Display.calandar_handle != null){
							clearInterval(WSConf.Display.calandar_handle);
							WSConf.Display.calandar_handle = null;
						}
					} catch(err) { } 
				}; obj.onmouseout = function(){
					try{
						if (WSConf.Display.calandar_handle == null){
							WSConf.Display.calandar_handle = setInterval('WSBase._displayer.calandoff()', 1000);
						}
					} catch(err) { } 
				}; if (WSConf.Display.calandar_handle != null){
					clearInterval(WSConf.Display.calandar_handle);
					WSConf.Display.calandar_handle = null;
				} WSConf.Display.calandar_handle = setInterval('WSBase._displayer.calandoff()', 1000);
			}
		},
		calandoff : function(){
			var obj = WSBase._func.is_object(WSConf.Display.calandar_id); if (obj){
				this._init.sldoff(obj);
			}
		}, 
		dialog : function(text, Subject){
			var obj = WSBase._func.is_object(WSConf.Display.dialog_id); if (!obj){
				for (var i = 0; i < WSConf.Plug.append_times; i++){
					if (WSBase._func.appender.div(WSConf.Display.dialog_id, 'wsbase_dialog', 22)){
						obj = WSBase._func.is_object(WSConf.Display.dialog_id);
						break;
					}
				}
			} if (obj){
				this._init.dlgon(obj, WSConf.Display.dialog_handle, Subject, text); if (WSConf.Drag.mover){
					var dragobj = WSBase._func.is_object(WSConf.Display.dialog_handle); if (dragobj){
						dragobj.onmouseover = function(evt){ try{ WSBase._displayer.setIndex(); } catch(err) { } };
						dragobj.onmousedown = function(evt){ try{ WSBase._drager.mover(obj, evt, 'active'); } catch(err) { } };
					}
				}
			} WSBase._plugins.loader(true); WSBase._plugins.masker(true);
		},
		popbox : function(text, Subject){
			var obj = WSBase._func.is_object(WSConf.Display.popbox_id); if (!obj){
				for (var i = 0; i < WSConf.Plug.append_times; i++){
					if (WSBase._func.appender.div(WSConf.Display.popbox_id, 'wsbase_dialog', 21)){
						obj = WSBase._func.is_object(WSConf.Display.popbox_id);
						break;
					}
				}
			} if (obj){
				this._init.dlgon(obj, WSConf.Display.popbox_handle, Subject, text, true); if (WSConf.Drag.mover){
					var dragobj = WSBase._func.is_object(WSConf.Display.popbox_handle); if (dragobj){
						dragobj.onmouseover = function(evt){ try{ WSBase._displayer.setIndex(true); } catch(err) { } };
						dragobj.onmousedown = function(evt){ try{ WSBase._drager.mover(obj, evt, 'active'); } catch(err) { } };
					}
				}
			} WSBase._plugins.loader(true); WSBase._plugins.masker(true);
		},
		inners : function(text, obj){
			if (obj){
				obj.innerHTML = this._init.clear(text); WSBase._func.evaler.js(text);
			} WSBase._plugins.loader(true); WSBase._plugins.masker(true);
		},
		closer : function(isPop){
			var obj = isPop ? WSBase._func.is_object(WSConf.Display.popbox_id) : WSBase._func.is_object(WSConf.Display.dialog_id); if (obj){
				this._init.dlgoff(obj);
			}
		},
		category : function(text){
			var obj = WSBase._func.is_object(WSConf.Display.category_id); if (!obj){
				for (var i = 0; i < WSConf.Plug.append_times; i++){
					if (WSBase._func.appender.div(WSConf.Display.category_id, 'wsbase_category', 26)){
						obj = WSBase._func.is_object(WSConf.Display.category_id);
						break;
					}
				}
			} if (obj){
				WSBase._plugins.masker(); this._init.caton(obj, WSConf.Display.category_handle, WSConf.Display.category_subject, text); if (WSConf.Drag.mover){
					var dragobj = WSBase._func.is_object(WSConf.Display.category_handle); if (dragobj){
						dragobj.onmousedown = function(evt){ try{ WSBase._drager.mover(obj, evt, 'active'); } catch(err) { } };
					}
				}
			} 
		},
		categoff : function(){
			var obj = WSBase._func.is_object(WSConf.Display.category_id); if (obj){
				this._init.dlgoff(obj);
			} WSBase._plugins.masker(true); 
		},
		prompter : function(sObj, msg, isClose){
			var obj = WSBase._func.is_object(WSConf.Display.prompt_id); if (isClose){
				/*
				+-------------------------------
				+	移除对象
				+-------------------------------
				*/
				if (obj){
					obj.style.display = 'none';
				} return true;
			} if (!obj){
				/*
				+-------------------------------
				+	建立对象
				+-------------------------------
				*/
				for (var i = 0; i < WSConf.Plug.append_times; i++){
					if (WSBase._func.appender.div(WSConf.Display.prompt_id, 'wsbase_prompt', 23)){
						obj = WSBase._func.is_object(WSConf.Display.prompt_id);
						break;
					}
				}
			} if (obj){
				this._init.sldon(sObj, obj, '<span onclick="WSBase._displayer.prompter(false,false,true)" style="cursor:default">' + msg + '</span>', false, true);
			}
		},
		pages : function(_F, _U, _P, _S, _G){
			if (_G){
				var _u = _G._u.value, _p = parseInt(_G._p.value), _s = parseInt(_G._s.value); if (_p > 0){
					if (_p > _s){
						_p = _s;
					} WSBase._func.director(_u.replace(/#/g, _p));
				} return false;
			} if (_F && _U && _S){
				var obj = WSBase._func.is_object(WSConf.Display.pages_id); if (!obj){
					for (var i = 0; i < WSConf.Plug.append_times; i++){
						if (WSBase._func.appender.div(WSConf.Display.pages_id, 'wsbase_pages', 27)){
							obj = WSBase._func.is_object(WSConf.Display.pages_id);
							break;
						}
					}
				} if (obj){
					if (obj.style.display == 'none'){
						var results = '<form method="post" onsubmit="return WSBase._displayer.pages(false, false, false, false, this)"><dl><dt><input type="text" name="_p" value="' + _P + '" /></dt><dd><input type="submit" value="Go" /></dd></dl><input type="hidden" name="_s" value="' + _S + '" /><input type="hidden" name="_u" value="' + _U + '" /></form>';
						this._init.sldon(_F, obj, results);
					} else {
						obj.style.display = 'none';
					}
				}
			}			
		},
		setIndex : function(isPop){
			var zd = 22, zp = 21, od = WSBase._func.is_object(WSConf.Display.dialog_id), op = WSBase._func.is_object(WSConf.Display.popbox_id); if (od && od.style.display != 'none' && op && op.style.display != 'none'){
				if (isPop){
					zd = 21;
					zp = 22;
				} od.style.zIndex = zd; op.style.zIndex = zp; 
			}
		}
	},
	Ajax : {
		xml : function(url, tar, title){
			url = url.replace(/&amp;/ig, '&'); if (this._localpage_(url) || (WSConf.Ajax.disabled && !AJAXFORCE)){
				WSBase._func.director(url);
				return true;
			} if (tar == 'dialog'){
				title = title ? title : WSConf.Display.dialog_subject; WSConf.Display.dialog_subject = title
				this._request_(url, 'dialog', title);
			} else if (tar == 'popbox') {
				title = title ? title : WSConf.Display.popbox_subject; WSConf.Display.popbox_subject = title;
				this._request_(url, 'popbox', title);
			} else {
				var obj = WSBase._func.is_object(tar); if (obj){
					this._request_(url, 'inners', obj);
				}
			}
		},
		_localpage_ : function(url){
			var tUrl = url, cUrl = window.location.href, tLen = 0, cLen = 0, offset = 0; if (tUrl == cUrl){
				return true;
			} tUrl = tUrl.toLowerCase(); cUrl = cUrl.toLowerCase(); tLen = tUrl.length; cLen = cUrl.length; if (cLen >= tLen){ offset = cLen - tLen;
				if (cUrl.substr(offset, tLen) == tUrl){
					return true;
				}
			} return false;
		},
		_loading_ : false, 
		_evaling_ : false,
		_request_ : function(url, type, identfy){
			if (url == null || url == ''){
				return false;
			} var request = false; if(window.XMLHttpRequest) { WSBase.Ajax._loading_ = true; request = new XMLHttpRequest();
				if(request.overrideMimeType) {
					request.overrideMimeType('text/xml');
				}
			} else if(window.ActiveXObject) {
				var versions = ['Microsoft.XMLHTTP', 'MSXML.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.7.0', 'Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.5.0', 'Msxml2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP']; for(var i=0; i<versions.length; i++) {
					try { request = new ActiveXObject(versions[i]); if(request) { break; } } catch(err) {}
				}
			} if (request){
				WSBase._plugins.masker();
				WSBase._plugins.loader();
				if (WSConf.Ajax.method == 'get'){
					if(window.XMLHttpRequest){
						request.open('GET', url);
						request.send(null);
					}else{
						request.open("GET", url, true);
						request.send();
					}
				} else {
					request.open('POST', url);
					request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
					request.send('in_ajax_submit=' + WSBase._func.gethash());
				} request.onreadystatechange = function(){
					if(request.readyState == 4){
						if (request.status == 200){ WSBase.Ajax._loading_ = false;
							var results = request.responseText;
							var sourcetype = results.substr(0, 5).toLowerCase();
							if (sourcetype == '<?xml'){
								results = request.responseXML.lastChild.firstChild.nodeValue;
							} if (type == 'popbox'){
								WSBase._displayer.popbox(results, identfy);
							} else if (type == 'dialog'){
								WSBase._displayer.dialog(results, identfy);
							} else {
								WSBase._displayer.inners(results, identfy);
							}
						} else {
							WSBase._plugins.masker(true);
							WSBase._plugins.loader(true);
							alert(WSConf.Ajax.notfound);
						}
					}
				}
			}
		}
	}
}, HTMLER = {
	updater : function(url){
		var obj = WSBase._func.is_object('htmlupdateform'); if (obj && typeof obj.src != 'undefined' && url != ''){
			obj.src = url.replace(/&amp;/ig, '&');
		}
	}
}, flasher = {
	swf : 'images/focus.swf', 
	ader : function(v1, v2, v3, v4, v5, v6, v7, v8){
		v1 = !isNaN(v1) && v1 > 0 ? parseInt(v1) : 240;
		v2 = !isNaN(v2) && v2 > 0 ? parseInt(v2) : 180; if (v7){ v2 += 20; }
		v6 = !isNaN(v6) && v6 > 0 ? parseInt(v6) : 5000;
		var ks = ['v1', 'v2', 'v3', 'v4', 'v5', 'v6', 'v7'], vs = [v1, v2, v3, v4, v5, v6, v7], tmp = vr = cm = '';
		var uri = (v8 ? v8 : '/') + this.swf;
		tmp += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + v1 + '" height="' + v2 + '">';
		tmp += '<param name="movie" value="' + uri + '" />';
		tmp += '<param name="allowScriptAccess" value="sameDomain" />';
		tmp += '<param name="quality" value="high" />';
		tmp += '<param name="menu" value="false" />';
		tmp += '<param name="wmode" value="opaque" />';
		for (var i = 0; i < ks.length; i++){ vr += cm + ks[i] + '=' + vs[i]; cm = '&amp;';
			tmp += '<param name="' + ks[i] + '" value="' + vs[i] + '" />';
		}
		tmp+='<param name="FlashVars" value="' + vr + '" />';
		tmp+='<embed src="' + uri + '?' + vr + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + v1 + '" height="' + v2 + '"></embed>';
		tmp += '</object>';
		document.write(tmp);
	}
}, marqueer = {
	spd : 10, 
	had : [], 
	cfg : [], 
	uper : function(id, height, limit, second){
		var obj = WSBase._func.is_object(id); if (obj){ alert('obj = ' + obj);
			var limit = !isNaN(limit) && limit > 0 ? parseInt(limit) : 100;
			var second = !isNaN(second) && second > 0 ? parseInt(second) : 5;
			var height = !isNaN(height) && height > 0 ? parseInt(height) : 200;
			var mheight = obj.offsetHeight, message = obj.innerHTML;
			if (mheight > height){
				message = message.replace(/href/g, 'onmouseover="marqueer.upstop(\'' + id + '\')" onmouseout="marqueer.upstart(\'' + id + '\')" href'); 
				message += message;
				obj.style.height = height + 'px';
				obj.style.overflow = 'hidden';
				obj.innerHTML = message;
				this.cfg[id] = [id, height, limit, mheight, second];
				this.updo(id, true);
			}
		}
	},
	updo : function(id, init){
		var obj = WSBase._func.is_object(id); if (obj){
			if (init){
				obj.scrollTop = this.cfg[id][3];
				this.had[id] = setInterval('marqueer.updo("' + id + '")', this.cfg[id][4] * 1000);
				return true;
			} else {
				clearInterval(this.had[id]);
			} var Toped = obj.scrollTop + 1; if (Toped > this.cfg[id][3]){
				Toped = 1;
			} obj.scrollTop = Toped; if (Toped % this.cfg[id][2] == 0 || Toped == this.cfg[id][3]){
				this.had[id] = setInterval('marqueer.updo("' + id + '")', this.cfg[id][4] * 1000);
			} else {
				this.had[id] = setInterval('marqueer.updo("' + id + '")', this.spd);
			}
		}
	}, 
	upstop : function(id){
		clearInterval(this.had[id]);
	},
	upstart : function(id){
		this.had[id] = setInterval('marqueer.updo("' + id + '")', this.cfg[id][4] * 1000);
	}
}; function $(id){
	return WSBase._func.is_object(id);
} 
document.onmouseover = function(e){
	var evt = e ? e : window.event; if (evt){
		var obj = evt.srcElement ? evt.srcElement : evt.target; if (typeof obj != 'undefined'){
			if (typeof(obj.alt) != 'undefined'){
				if(obj.alt != null && obj.alt != ''){
					obj.pvalue = obj.alt;
					obj.alt = '';
				}
			} if (typeof(obj.title) != 'undefined'){
				if(obj.title != null && obj.title != ''){
					obj.pvalue = obj.title;
					obj.title = '';
				}
			} if (obj.pvalue == null || obj.pvalue == ''){
				var ATD = WSBase._func.is_object(WSConf.Display.altitle_id); if (ATD && ATD.style.display != 'none'){
					WSBase._displayer._init.sldoff(ATD);
				}
			} else { obj.style.cursor = 'pointer';
				WSBase._displayer.altitle(obj, obj.pvalue.replace(/\\n/g, '<br />'));
			}
		}
	}
};
document.write('<style type="text/css">'); WSBase.Browser.IE ? 
document.write('.wsbase_opacity {filter:alpha(opacity:50);}') : 
document.write('.wsbase_opacity {opacity:0.50;}');
document.write('</style>');
document.write('<div id="' + WSConf.Plug.append_id + '"></div>');
document.write('<iframe id="ajaxform" name="ajaxform" src="" width="0" height="0" style="width:0px;height:0px;overflow:hidden;display:none"></iframe>');
