



/* faster access by caching the window's properties by amachang. http://d.hatena.ne.jp/amachang/20071010/1192012056 */
/*@cc_on eval((function(props) { var code = []; for (var i = 0, l = props.length;i<l;i++){ var prop = props[i]; window['_'+prop]=window[prop]; code.push(prop+'=_'+prop); }; return 'var '+code.join(','); })('document self top parent alert setInterval clearInterval setTimeout clearTimeout'.split(' '))); @*/

/* setInterval03.js by amachang. http://d.hatena.ne.jp/amachang/20060924/1159084608 */
(function(){ var _si_nativeSetInterval = window.setInterval , _si_nativeClearInterval = window.clearInterval , _si_intervalTime = 10 , _si_counter = 1 , _si_length = 0 , _si_functions = {} , _si_counters = {} , _si_numbers = {} , _si_intervalId = undefined; var _si_loop = function() { var f = _si_functions, c = _si_counters, n = _si_numbers; for(var i in f) { if(!--c[i]) { f[i](); c[i] = n[i]; } } }; window.setInterval = function(handler, time) { if(typeof handler == 'string') handler = new Function(handler); _si_functions[_si_counter] = handler; _si_counters[_si_counter] = _si_numbers[_si_counter] = Math.ceil(time / _si_intervalTime); if (++_si_length && !_si_intervalId) { _si_intervalId = _si_nativeSetInterval(_si_loop, _si_intervalTime); }; return _si_counter++; }; window.clearInterval = function(id) { if(_si_functions[id]) { delete _si_functions[id]; delete _si_numbers[id]; delete _si_counters[id]; if (!--_si_length && _si_intervalId) { _si_nativeClearInterval(_si_intervalId); _si_intervalId = undefined; } } }; })();

function COM(){
	
	var common = this;
	
	
	
	
	
	/* ---------- Enhancing of built-in class ---------- */
	
	COM.prototype.String = function(){
		var Wrap = this;
		this.str = new String(arguments[0]);
		var Substance = this.str;
		for(var i in this)(function(prop){
			if(Wrap[prop] instanceof Function)(function(name,method){
				Substance[name] = function(){
					return method.apply(Substance,arguments);
				}
			})(prop,Wrap[prop]);
		})(i);
		return this.str;
	};
	COM.prototype.String.prototype = {
		addGetParameter : function(param){
			return (this.indexOf("?") != -1) ? this + "&" + common.createGetString(param) : this + "?" + common.createGetString(param) ;
		},
		untiCache : function(){
			return this + ((this.indexOf("?") != -1) ? "&" : "?") + (new Date()).getTime() ;
		},
		trim : function(){
			var pattern = (arguments.length > 0 && arguments[0] === true) ? /^[\s\r\n]*|[\s\r\n]*$/g : /^\s*|\s*$/g ;
			return this.replace(/^\s*|\s*$/g,"");
		},
		each : function(){
			var callback = (arguments.length > 0 && typeof arguments[0] == "function") ? arguments[0] : null ;
			for(var i=0 , l=this.length ; i<l ; i++) if(callback) callback(this.charAt(i));
		}
	};
	
	COM.prototype.Object = function(){
		var Wrap = this; this.obj = {};
		var Substance = this.obj;
		for(var i in this)(function(prop){
			if(Wrap[prop] instanceof Function)(function(name,method){
				Substance[name] = function(){
					return method.apply(Substance,arguments);
				}
			})(prop,Wrap[prop]);
		})(i);
		return this.obj;
	}
	COM.prototype.Object.prototype = {
		each : function(){
			var func = arguments[0];
			for(var i in this) func.apply(this[i],[i,this[i]]);
		}
	};
	
	COM.prototype.Array = function(){
		var Wrap = this; this.arr = [];
		this.arr.push.apply(this.arr,arguments);
		var Substance = this.arr;
		for(var i in this)(function(prop){
			if(Wrap[prop] instanceof Function)(function(name,method){
				Substance[name] = function(){
					return method.apply(Substance,arguments);
				}
			})(prop,Wrap[prop]);
		})(i);
		return this.arr;
	};
	COM.prototype.Array.prototype = {
		item : function(){
			var A = this;
			if(isNaN(arguments[0])){
				return this[0];
			}
			else{
				if(arguments[0] > 0){
					return this[arguments[0]];
				}
				else{
					return this[this.length + arguments[0]];
				}
			}
		},
		each : function(){
			var func = arguments[0];
			for(var i=0 , l=this.length ; i<l ; i++) func.apply(this[i],[i,this[i]]);
		},
		shuffle : function(){
			var tmp = [];
			tmp.push.apply(tmp,this);
			var len = tmp.length , ret = new common.Array();
			while(len){
				var c = Math.floor(Math.random() * len);
				ret[ret.length] = tmp[c];
				tmp.splice(c,1);
				len--;
			}
			return ret;
		},
		search : function(){
			var ret = new common.Array() , needle = arguments[0];
			if(arguments.length < 1) return ret;
			this.each(function(index,item){
				if(item == needle) ret.push(index);
			});
			return ret;
		},
		swap : function(){
			if(arguments.length < 2) return this;
			var ret = new common.Array() ,
				isKey = (arguments.length > 2 && arguments[2].toUpperCase() == "KEY") ? true : false ,
				ARR = this;
			if(isKey){
				this.each(function(index,item){
					if(index == arguments[0]) ret.push(ARR[arguments[1]]);
					else if(index == arguments[1]) ret.push(ARR[arguments[0]]);
					else ret.push(item);
				});
			}
			else{
				var item1 = this.search(arguments[0]);
				var item2 = this.search(arguments[1]);
				if(item1.length < 1 || item2.length < 2) return this;
				this.each(function(index,item){
					if(index == item1[0]) ret.push(ARR[item1[0]]);
					else if(index == item2[0]) ret.push(ARR[item2[0]]);
					else ret.push(item);
				});
			}
			return ret;
		},
		remove : function(){
			if(arguments.length < 1) return this;
			var Arr = this;
			var arg = new common.Array(); arg.push.apply(arg,arguments);
			
			arg.each(function(index,item){
				var result = Arr.search(item);
				result.sort(function(a,b){ return (a - b) });
				for(var i=result.length-1 ; i>=0 ; i--)(function(key){
					Arr.splice(key,1);
				})(result[i]);
			});
			
		}
	};
	COM.prototype.Image = function(){
		var Wrap = this;
		this.img = common.A(new Image());
		var Substance = this.img;
		for(var i in this)(function(prop){
			if(Wrap[prop] instanceof Function)(function(name,method){
				Substance[name] = function(){
					return method.apply(Substance,arguments);
				}
			})(prop,Wrap[prop]);
		})(i);
		if(arg.length > 0 && typeof arg[0] == "string") this.img.src = arg[0];
		return this.img;
	};
	COM.prototype.Image.prototype = {
		load : function(){
			var arg = new common.Array(); arg.push.apply(arg,arguments);
			var src = (arg.length > 0 && typeof arg[0] == "string") ? arg[0] : null ;
			var callback = (arg.length > 0 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
			
			if(callback) this.addEventListener("load",callback);
			
		}
	};
	
	
	
	/* ---------- variables ---------- */
	
	this.__WindowOnload        = window.onload;
	this.__WindowOnresize      = window.onresize;
	this.__WindowOnscroll      = window.onscroll;
	this._startup_items        = new common.Array();
	this._onresize_items       = new common.Array();
	this._onscroll_items       = new common.Array();
//	this._currentScript        = null;
	this._scriptName           = "com.js";
	this._SARI_safemode        = 1;
	this._SARI_safemode_array  = new common.Array("img","input");
	this._SARI_className       = "SARI";
	this._SARI_object          = {};
	this._mailto_className     = "mailto";
	this._DOM                  = false;
	this._debugger             = {};
	this._debugger.write       = function(){};
	this._debug_mode           = false;
	this._debug_position       = "top right";
	this._debug_size           = [500,300];
	this._highestdepth         = 0;
	this._e                    = new common.Array();
	
	
	
	
	
	/* ---------- functions ---------- */
	
	COM.prototype.event = function(){
		
		this.element = {};
		this.func = new common.Array();
	};
	COM.prototype.event.prototype = {
		addElement : function(ee,eid){
			this.element[eid] = ee;
		}
	};
	this.event = new common.event();
	
	COM.prototype.eventElement = function(element){
		this.obj = (element.isCE) ? element : common.A(element) ;
		this.func = {};
		this.listener = {};
	};
	COM.prototype.eventElement.prototype = {
		__addEvent : function(type){
			if(document.addEventListener){
				this.obj.__addEventListener(type,this.listener[type],false);
			}
			else if(document.attachEvent){
				if((type == "load" && /IMG|INPUT|SCRIPT|FRAME|IFRAME/.test(this.obj.nodeName)) && /complete|loaded/.test(this.obj.readyState)) this.exec(type,window.event);
				else this.obj.attachEvent("on" + type,this.listener[type]);
			}
		},
		__removeEvent : function(type){
			if(document.removeEventListener) this.obj.__removeEventListener(type,this.listener[type],false);
			else if(document.detachEvent) this.obj.detachEvent("on" + type,this.listener[type]);
		},
		exec : function(type,evt){
			var EE = this;
			if(this.func[type]) this.func[type].each(function(index,key){
				common.event.func[key](EE.obj,evt);
			});
		},
		add : function(type,key){
			var EE = this;
			
			if(!this.listener[type]){
				this.listener[type] = function(e){
					var evt = (window.event) ? window.event : e ;
					EE.exec(type,evt);
				};
				this.__addEvent(type);
			}
			
			if(!this.func[type]) this.func[type] = new common.Array();
			this.func[type].push(key);
			
		},
		remove : function(){
			var arg = new common.Array(); arg.push.apply(arg,arguments);
			var EE = this;
			var type = (arg.length > 0 && typeof arg[0] == "string") ? arg[0] : null ;
			var key = (arg.length > 0 && !isNaN(arg[1])) ? arg[1] : null ;
			
			for(var i in this.func){
				if(type == null || type == i){
					if(key != null) this.func[i].remove(key);
					
					if(key == null || this.func[i].length < 1){
						delete this.func[i];
						this.__removeEvent(i);
						this.listener[i] = null;
						delete this.listener[i];
					}
				}
			}
		}
	};
	
	COM.prototype.bind = function(element,type,fn){
		
		if(!element.eid){
			element.eid = (new Date()).getTime();
			common.event.addElement(new common.eventElement(element),element.eid);
		}
		
		var key = null;
		var sres = common.event.func.search(fn);
		if(sres.length < 1){
			common.event.func.push(fn);
			key = common.event.func.length - 1;
		}
		else{
			key = sres[0];
		}
		
		common.event.element[element.eid].add(type,key);
	};
	
	COM.prototype.unbind = function(element,type,fn){
		if(!element.eid) return;
		
		var sres = common.event.func.search(fn);
		var key = (sres.length > 0) ? parseInt(sres[0]) : null;
		
		common.event.element[element.eid].remove(type,key);
	};
	
	
	
	COM.prototype.Import = function(src){
		var att = (arguments.length > 1 && typeof arguments[1] == "object") ? arguments[1] : {} ,
			script = document.createElement("script") ,
			flag = true; script.type = "text/javascript";
		script.src = src;
		for(var i in att) script.setAttribute(i,att[i]);
		common.getElementsBySelector("script").each(function(index,item){
			if(item.src == script.src) flag = false;
		});
		if(flag !== true) return;
		if(common._DOM !== true) document.write("<" + "script type=\"text/javascript\" src=\"" + src + "\"></" + "script>");
		else common.getElementsBySelector("head")[0].appendChild(script);
	};
	
	COM.prototype.getElementsByTagAndClassName = function(tag_name,class_name){
		return common.D((tag_name == "*") ? "."+class_name : tag_name+"."+class_name);
	};
	
	COM.prototype.getBeforeElement = function(obj){
		var ret = false; (function(elem){
			if(!!elem.previousSibling){
				var tmp = elem.previousSibling;
				if(tmp.nodeType == 1) ret = tmp;
				else arguments.callee(tmp);
			}
		})(obj);
		return ret;
	};
	
	COM.prototype.getNextElement = function(obj){
		var ret = false;
		(function(elem){
			if(!!elem.nextSibling){
				var tmp = elem.nextSibling;
				if(tmp.nodeType == 1) ret = tmp;
				else arguments.callee(tmp);
			}
		})(obj);
		return ret;
	};
	
	COM.prototype.getChildElements = function(obj){
		var ret = new common.Array() , cn = obj.childNodes;
		for(var i=0 , l=cn.length ; i<l ; i++) if(cn[i].nodeType == 1) ret.push(cn[i]);
		return ret;
	};
	
	COM.prototype.getChildElementsByTagName = function(obj,tagname){
		var ret = new common.Array();
		var cn = obj.childNodes;
		for(var i=0 , l=cn.length ; i<l ; i++) if(cn[i].nodeType == 1 && cn[i].nodeName == tagname.toUpperCase()) ret.push(cn[i]);
		return ret;
	};
	
	COM.prototype.getChildElementById = function(obj,id){
		var ret = null;
		var cn = obj.childNodes;
		for(var i=0 , l=cn.length ; i<l ; i++){
			if(cn[i].nodeType == 1 && cn[i].id == id) ret = cn[i];
			break;
		}
		return ret;
	};
	
	COM.prototype.isClassMatch = function(element,className){
		if(!element.className) return;
		var ret = false;
		for(var cls = element.className.split(" ") , i=0 , l=cls.length ; i<l ; i++){
			if(cls[i] == className){
				ret = true;
				break;
			}
		}
		return ret;
	};
	
	COM.prototype.isAttMatch = function(element,att){
		var ret = true;
		for(var i in att){
			if(!element[i] || element[i] != att[i]){
				ret = false;
				break;
			}
		}
		return ret;
	};
	
	COM.prototype.getElementsBySelector = function(selector){
		
		var _ret = new common.Array() ,
			_r = -1 ,
			_arg = arguments ,
			_root = (_arg.length>1&&_arg[1].nodeType==1)?_arg[1]:document ,
			_sel = new common.Array() ,
			_sep_tmp = null ,
			_sep_pattern = /[ >\+]/g ,
			_tagname_pattern = /^(A|ABBR|ACRONYM|ADDRESS|APPLET|AREA|B|BASE|BASEFONT|BDO|BGSOUND|BIG|BLINK|BLOCKQUOTE|BODY|BR|BUTTON|CAPTION|CENTER|CITE|CODE|COL|COLGROUP|COMMENT|DD|DEL|DFN|DIR|DIV|DL|DT|EM|EMBED|FIELDSET|FONT|FORM|FRAME|FRAMESET|H1|H2|H3|H4|H5|H6|HEAD|HR|HTML|I|IFRAME|ILAYER|IMG|INPUT|INS|ISINDEX|KBD|LABEL|LAYER|LEGEND|LI|LINK|LISTING|MAP|MARQUEE|MENU|META|MULTICOL|NOBR|NOEMBED|NOFRAMES|NOLAYER|NOSCRIPT|OBJECT|OL|OPTGROUP|OPTION|P|PARAM|PLAINTEXT|PRE|Q|RB|RP|RT|RUBY|S|SAMP|SCRIPT|SELECT|SMALL|SPACER|SPAN|STRIKE|STRONG|STYLE|SUB|SUP|TABLE|TBODY|TD|TEXTAREA|TFOOT|TH|THEAD|TITLE|TR|TT|U|UL|VAR|WBR|XMP)$/ig ,
			_classname_pattern = /\.([a-z_\u00C0-\uFFEE\-][\w\u00C0-\uFFEE\-]*)/i ,
			_id_pattern = /#([a-z_\u00C0-\uFFEE\-][\w\u00C0-\uFFEE\-]*)/i ,
			_att_pattern = /\[([^\]=]+)(?:=["']?([^\'\"\]]+)['"]?)?\]/g ,
			_pseudo_pattern = /:(link|visited|hover|active|first\-child|last\-child|focus|first\-line|first\-letter|nth\-child|nth\-last\-child|nth\-of\-type|nth\-last\-of\-type)(?:\(([^\)]+)\))?/ig ,
			_quick_selector = {
				"body" : document.body
			};
		
		selector = new common.String(selector);
		selector = selector.trim();
		selector = selector.replace(/(['"])([^"']+)\1/g,function($0,$1,$2){ return $1 + $2.replace(/\s/g,"%%NBSP%%") + $1; });
		selector = selector.replace(/\s*(?:\[|\()[^\]\)]+(?:\]|\))/g,function($0){ $0 = new common.String($0); return $0.trim().replace(/\s/g,""); });
		selector = selector.replace(/\s*( |>|\+|\:)\s*/g,"$1");
		
		(function(selsrc,root){
			if(selsrc.indexOf(",") != -1){
				var tmp = selsrc.split(",");
				for(var i=0 , l=tmp.length ; i<l ; i++) arguments.callee(tmp[i],root);
			}
			else{
				var sel_array = selsrc.replace(_sep_pattern,"%%SEP%%").replace(/%%NBSP%%/g," ").split("%%SEP%%") ,
					sep_match = selsrc.match(_sep_pattern) ,
					ret = [] ,
					r = -1 ,
					i=0 ,
					len=sel_array.length;
				if(!sep_match) sep_match = [];
				else sep_match.unshift(null);
				
				(function(INDEX,ROOT){
					
					var F = arguments.callee , ATT = null , PSEUDO = null , TAG = null , CLASS = null , ID = null;
					var SEL = sel_array[INDEX].replace(_att_pattern,function($0,name,value){
						if(!ATT) ATT = {}; ATT[name] = value;
						return "";
					}).replace(_pseudo_pattern,function($0,name,syntax){
						if(!PSEUDO) PSEUDO = {}; PSEUDO[name] = syntax;
						return "";
					}).replace(_classname_pattern,function($0,value){
						CLASS = value;
						return "";
					}).replace(_id_pattern,function($0,value){
						ID = value;
						return "";
					}).replace(_tagname_pattern,function($0){
						TAG = $0;
						return "";
					});
					var SEP = sep_match[INDEX];
					
					
					
					if(SEP == "+"){
						(function(){
							if(ROOT == document) return;
							var pE = common.getBeforeElement(ROOT) , nE = common.getNextElement(ROOT) , tmp = [];
							if(pE) tmp.push(pE); if(nE) tmp.push(nE); if(tmp.length < 1) return;
							for(var t=0 , n=tmp.length ; t<n ; t++)(function(ind,item){
								var flag = true;
								if(TAG && item.nodeName != TAG.toUpperCase()) flag = false;
								if(CLASS && !common.isClassMatch(item,CLASS)) flag = false;
								if(ID && item.id != ID) flag = false;
								if(ATT && !common.isAttMatch(item,ATT)) flag = false;
								
								if(flag == true){
									if(INDEX < len - 1) F(INDEX + 1,item);
									else _ret[++_r] = item;
								}
							})(t,tmp[t]);
						})();
					}
					else{
						(function(){
							if(ID){
								var tmp = document.getElementById(ID);
								if(tmp && (ROOT == document || tmp.parentNode == ROOT) && (!ATT || common.isAttMatch(tmp,ATT))){
									if(INDEX < len - 1) F(INDEX + 1,tmp);
									else _ret[++_r] = tmp;
								}
							}
							else{
								var tmp = (SEP == ">") ? common.getChildElementByTagName((TAG)?TAG:"*",ROOT) : ROOT.getElementsByTagName((TAG)?TAG:"*");
								for(var t=0 , n=tmp.length ; t<n ; t++)(function(ind,item){
									var flag = true;
									if(CLASS && !common.isClassMatch(item,CLASS)) flag = false;
									if(ATT && !common.isAttMatch(item,ATT)) flag = false;
									
									if(flag == true){
										if(INDEX < len - 1) F(INDEX + 1,item);
										else _ret[++_r] = item;
									}
								})(t,tmp[t]);
							}
							
						})();
					}
					
					
				})(i,root);
			}
		})(selector,_root);
		
		return _ret;
		
		
	};
	COM.prototype.D = common.getElementsBySelector;
	
	COM.prototype.clearChildNodes = function(obj){
		if(!obj) return;
		var cn = obj.childNodes , ret = new common.Array();
		for(var i=cn.length-1 ; i>=0 ; i--){
			ret.push(cn[i]);
			obj.removeChild(cn[i]);
		}
		return ret.reverse();
	};
	
	
	
	COM.prototype.A = function(obj){
		var ret = null;
		common._e.each(function(index,item){
			if(item == obj) ret = item;
		});
		if(!ret){
			ret = (function(element){
				if(element.addEventListener) element.__addEventListener = element.addEventListener;
				element.addEventListener = function(type,cb){
					var useCapture = (arguments.length > 2 && arguments[2] === true) ? true : false ;
					common.bind(element,type,cb,useCapture);
					return element;
				};
				if(element.removeEventListener) element.__removeEventListener = element.removeEventListener;
				element.removeEventListener = function(type,cb){
					var useCapture = (arguments.length > 2 && arguments[2] === true) ? true : false ;
					common.unbind(element,type,cb,useCapture);
					return element;
				};
				element.setStyle = function(style){
					common.setStyle(element,style);
					return element;
				};
				element.getSize = function(){
					return { w : element.offsetWidth , h : element.offsetHeight };
				};
				element.setAtt = function(){
					if(typeof arguments[0] == "object"){
						var override = (arguments.length > 1 && arguments[1] == true) ? true : false;
						for(var i in arguments[0]){
							if(!element.getAttribute(i) || override == true){
								if(i.toUpperCase() == "CLASS") element.className = arguments[0][i];
								else element.setAttribute(i,arguments[0][i]);
							}
						}
					}
					else if(arguments.length >= 2 && typeof arguments[0] == "string" && typeof arguments[1] == "string"){
						var override = (arguments.length > 2 && arguments[2] == true) ? true : false;
						if(!element.getAttribute(arguments[0]) || override == true){
							if(arguments[0].toUpperCase() == "CLASS") element.className = arguments[1];
							else element.setAttribute(arguments[0],arguments[1]);
						}
					}
					return element;
				};
				element.getAtt = function(){
					if(arguments.length > 0 && typeof arguments[0] == "string"){
						if(arguments[0].toUpperCase() == "CLASS") return element.className;
						else return element.getAttribute(arguments[0]);
					}
					else{
						var ret = {};
						for(var i=0 , l=element.attributes.length ; i<l ; i++)(function(){
							var att_name = (element.attributes[i].nodeName.toUpperCase == "CLASS" || element.attributes[i].nodeName.toUpperCase == "CLASSNAME") ? "class" : element.attributes[i].nodeName ;
							var att_value = (att_name == "class") ? element.className : element.getAttribute(att_name) ;
							ret[att_name] = att_value;
						})(i);
						return ret;
					}
				};
				element.append = function(node){
					element.appendChild(node);
					return element;
				};
				element.remove = function(node){
					element.removeChild(node);
					return element;
				};
				element.before = function(node){
					element.parentNode.insertBefore(node,element);
					return element;
				};
				element.after = function(node){
					var strict = (arguments.length > 1 && arguments[1] == true) ? true : false ;
					var n = common.getNextElement(element);
					
					if(strict && element.nextSibling) element.parentNode.insertBefore(node,element.NextSibling);
					else if(n) element.parentNode.insertBefore(node,n);
					else element.parentNode.appendChild(node);
					return element;
				};
				element.Delete = function(){
					var p = element.parentNode;
					if(arguments.length > 0 && arguments[0] == true){
						common.clearChildNodes(element).each(function(index,cn){
							p.insertBefore(cn,element);
						});
						p.removeChild(element);
					}
					else{
						p.removeChild(element);
					}
					return element;
				};
				element.getElementsBySelector = function(selector){
					return common.getElementsBySelector(selector,element);
				};
				element.D = element.getElementsBySelector;
				element.getBeforeElement = function(){
					return common.getBeforeElement(element);
				};
				element.getNextElement = function(){
					return common.getNextElement(element);
				};
				element.getChildElements = function(){
					return common.getChildElements(element);
				};
				element.getChildElementsByTagName = function(tagname){
					return common.getChildElementsByTagName(element,tagname);
				};
				element.clearChildNodes = function(){
					return common.clearChildNodes(element);
				};
				
				element.E = function(selector){
					return common.E(selector,element);
				};
				
				element.isCE = true;
				
				return element;
			})(obj);
			common._e.push(ret);
		}
		return ret;
	};
	
	COM.prototype.E = function(){
		
		function ComCollection(selector){
			this.selector = { value : selector, type : undefined };
			this.length = 0;
		}
		ComCollection.prototype = {
			__additem : function(element){
				this[this.length] = common.A(element);
				this.length++;
			},
			each : function(){
				var callback = (arguments.length > 0 && typeof arguments[0] == "function") ? arguments[0] : null;
				if(callback) for(var i=0 , l=this.length ; i<l ; i++) callback(i,this[i]);
			},
			addEventListener : function(type,callback){
				var useCapture = (arguments.length > 2 && arguments[2] == true) ? true : false ;
				this.each(function(index,item){ item.addEventListener(type,callback,useCapture); });
			},
			removeEventListener : function(type,callback){
				var useCapture = (arguments.length > 2 && arguments[2] == true) ? true : false ;
				this.each(function(index,item){ item.removeEventListener(type,callback,useCapture); });
			}
		};
		
		
		var selector = arguments[0] ,
			parent = (arguments.length > 1 && arguments[1].nodeType == 1) ? arguments[1] : document ,
			ret = new ComCollection(selector);
		if(selector.nodeType == 1) ret.__additem(selector);
		else if(typeof selector == "object") for(var i in selector) ret.__additem(selector[i]);
		else common.getElementsBySelector(selector,parent).each(function(index,item){ ret.__additem(item); });
		return ret;
	};
	
	
	COM.prototype.G = function(html){
		/* this is under construnction */
		var arg = new common.Array(); arg.push.apply(arg,arguments);
		var tag_pattern = /<(\/)?([^>]+)>/;
		var tagname_pattern = /^(A|ABBR|ACRONYM|ADDRESS|APPLET|AREA|B|BASE|BASEFONT|BDO|BGSOUND|BIG|BLINK|BLOCKQUOTE|BODY|BR|BUTTON|CAPTION|CENTER|CITE|CODE|COL|COLGROUP|COMMENT|DD|DEL|DFN|DIR|DIV|DL|DT|EM|EMBED|FIELDSET|FONT|FORM|FRAME|FRAMESET|H1|H2|H3|H4|H5|H6|HEAD|HR|HTML|I|IFRAME|ILAYER|IMG|INPUT|INS|ISINDEX|KBD|LABEL|LAYER|LEGEND|LI|LINK|LISTING|MAP|MARQUEE|MENU|META|MULTICOL|NOBR|NOEMBED|NOFRAMES|NOLAYER|NOSCRIPT|OBJECT|OL|OPTGROUP|OPTION|P|PARAM|PLAINTEXT|PRE|Q|RB|RP|RT|RUBY|S|SAMP|SCRIPT|SELECT|SMALL|SPACER|SPAN|STRIKE|STRONG|STYLE|SUB|SUP|TABLE|TBODY|TD|TEXTAREA|TFOOT|TH|THEAD|TITLE|TR|TT|U|UL|VAR|WBR|XMP)$/i;
		var empty_tag_pattern = /^(AREA|BASE|BASEFONT|BGSOUND|BR|COL|EMBED|FRAME|HR|IFRAME|ILAYER|IMG|INPUT|LINK|META|NOBR|SPACER)$/i;
		var block_tag_pattern = /^(BLOCKQUOTE|BODY|CAPTION|DD|DIV|DL|DT|FIELDSET|FORM|H1|H2|H3|H4|H5|H6|HTML|ILAYER|LAYER|LEGEND|LI|OL|P|PRE|TABLE|TBODY|TD|TFOOT|TH|THEAD|TR|UL)$/i;
		var att_pattern = / ([^=]+)(?:=["']?([^\'\"\]]+)['"]?)?/g;
		if(arg.length > 1 && arg[1] == "text"){
			return document.createTextNode(html);
		}
		else{
			if(tagname_pattern.test(html)) return com.A(document.createElement(html));
			else return document.createTextNode(html);
		}
	};
	
	COM.prototype.delegate = function(base,current,methodname){
		current[methodname] = function(){
			return base[methodname].apply(this,arguments);
		};
	};
	
	COM.prototype.CompareVersion = function(ver1,ver2){
		var ret = true, v1 = ver1.split("."), v2 = ver2.split("."), d1 = 0, d2 = 0, L = Math.min(v1.length,v2.length);
		for(var i=0 ; i<L ; i++){
			if(ret != true) break;
			d1 = (!v1[i]) ? 0 : parseInt(v1[i]) ;
			d2 = (!v2[i]) ? 0 : parseInt(v2[i]) ;
			if(d1 > d2) ret = ver1;
			if(d1 < d2) ret = ver2;
		};
		return ret;
	};
	
	COM.prototype.sprint_r = function(obj){
		
		function tab(n){
			var ret = "";
			for(var i=0 ; i<n ; i++) ret += "\t";
			return ret;
		};
		
		var r_check = (function(){
			var checked = new common.Array();
			return function(obj){
				var ret = true;
				checked.each(function(index,item){
					if(obj == item) ret = false;
				});
				if(ret == true) checked.push(obj);
				return ret;
			}
		})();
		
		return (function(obj,t){
			var ret = "";
			for(var i in obj){
				ret += tab(t) + "[" + i + "] => ";
				if(typeof obj[i] == "object" || typeof obj[i] == "array"){
					ret += "(\n";
					if(r_check(obj[i])) ret += arguments.callee(obj[i],t+1);
					else ret += tab(t+1) + "::: RECURSIVE :::\n";
					ret += tab(t) + ")\n";
				}
				else{
					ret += obj[i] + "\n";
				}
			}
			return ret;
		})(obj,0);
		
	};
	
	COM.prototype.print_r = function(obj){
		var target = "debugger";
		if(arguments.length > 1 && arguments[1] == "alert") target = "alert";
		else if(arguments.length > 1 && arguments[1].nodeType == 1) target = arguments[1];
		
		var str = common.sprint_r(obj);
		if(target == "debugger"){
			common._debugger.write(str);
		}
		else if(target == "alert"){
			alert(str);
		}
		else if(target.nodeType == 1){
			var pre = document.createElement("pre");
			pre.appendChild(document.createTextNode(str));
			target.appendChild(pre);
		}
	};
	
	COM.prototype.browsercheck = function(){
		function getUserAgent(){
			return navigator.userAgent;
		};
		function client(){
			var str = null ,
				UA = getUserAgent();
			if(UA.toUpperCase().indexOf("MSIE") != -1) str = "MSIE";
			else if(UA.toUpperCase().indexOf("SAFARI") != -1) str = "Safari";
			else if(UA.toUpperCase().indexOf("FIREFOX") != -1) str = "Firefox";
			else if(UA.toUpperCase().indexOf("NETSCAPE") != -1 || ( UA.toUpperCase().indexOf("MOZILLA/4") != -1 && UA.toUpperCase().indexOf("MSIE") == -1 )) str = "Netscape";
			else if(UA.toUpperCase().indexOf("OPERA") != -1) str = "Opera";
			return str;
		};
		function platform(){
			var str = { major : null, minor : null } ,
				UA = getUserAgent();
			if(UA.toUpperCase().indexOf("WINDOWS") != -1){
				str["major"] = "Windows";
				if(UA.toUpperCase().indexOf("NT 6.") != -1) str["minor"] = "Vista";
				else if(UA.toUpperCase().indexOf("NT 5.1") != -1) str["minor"] = "XP";
				else if(UA.toUpperCase().indexOf("NT 5.0") != -1) str["minor"] = "2000";
				else if(UA.toUpperCase().indexOf("WINDOWS 95") != -1 || UA.toUpperCase().indexOf("WIN 95") != -1) str["minor"] = "95";
				else if(UA.toUpperCase().indexOf("WINDOWS 98") != -1 || UA.toUpperCase().indexOf("WIN 98") != -1 ) str["minor"] = "98";
				else if(UA.toUpperCase().indexOf("WIN 9X 4.90") != -1) str["minor"] = "ME";
			}
			else if(UA.toUpperCase().indexOf("MAC") != -1){
				var pattern = new RegExp("MSIE ([0-9\.]+)") ,
					match = UA.match(pattern);
				if(UA.toUpperCase().indexOf("MAC OS X") != -1 || (match != null && match[1] - 0 >= 5.1)) str["major"] = "MacOSX";
				else str["major"] = "Mac";
			}
			else if(UA.toUpperCase().indexOf("X11") != -1){
				str["major"] = "unix";
			};
			return str;
		};
		function version(){
			var str = { major : null, minor : null } ,
				Cl = client() ,
				Pl = platform().major ,
				UA = getUserAgent();
			if(Cl == "MSIE"){
				var pattern = new RegExp("MSIE ([0-9\.]+)") ,
					match = UA.match(pattern);
				if(match != null){
					str["major"] = match[1].charAt(0);
					str["minor"] = match[1];
				}
			}
			if(Cl == "Safari"){
				var pattern = new RegExp("Safari/([0-9\.]+)") ,
					match = UA.match(pattern);
				if(match != null){
					var v = match[1] - 0;
					if(common.CompareVersion(v.toString(),"312.6") == true || common.CompareVersion(v.toString(),"312.6") == "312.6") str["major"] = 1;
					else if((common.CompareVersion(v.toString(),"412") == v) && (common.CompareVersion(v.toString(),"419.3") == true || common.CompareVersion(v.toString(),"419.3") == "419.3")) str["major"] = 2;
					else if(common.CompareVersion(v.toString(),"522") == v && (common.CompareVersion(v.toString(),"525.27.1") == true || common.CompareVersion(v.toString(),"525.27.1") == "525.27.1")) str["major"] = 3;
					else if(common.CompareVersion(v.toString(),"525.27.1") == v) str["major"] = 4;
					str["minor"] = match[1];
				}
			}
			if(Cl == "Firefox"){
				var pattern = new RegExp("Firefox/([0-9\.]+)") ,
					match = UA.match(pattern);
				if(match != null){
					str["major"] = match[1].charAt(0);
					str["minor"] = match[1];
				}
			}
			if(Cl == "Netscape"){
				var pattern = new RegExp("Netscape/([0-9\.]+)") ,
					match = UA.match(pattern);
				if(match != null){
					str["major"] = match[1].charAt(0);
					str["minor"] = match[1];
				}
				else{
					var pattern = new RegExp("Mozilla/([0-9\.]+)") ,
						match = UA.match(pattern);
					if(match != null){
						str["major"] = match[1].charAt(0);
						str["minor"] = match[1];
					}
				}
			}
			if(Cl == "Opera"){
				var pattern = new RegExp("Opera/([0-9\.]+)") ,
					match = UA.match(pattern);
				if(match != null){
					str["major"] = match[1].charAt(0);
					str["minor"] = match[1];
				}
			}
			return str;
		};
		return {
			plf : platform(),
			nav : client(),
			ver : version()
		};
	};
	this._browser = this.browsercheck();
	
	COM.prototype.marge = function(base,addon){
		var arg = new common.Array(); arg.push.apply(arg,arguments);
		var override = (arg.length > 2 && arg[2] == true) ? true : false ;
		
		if(typeof base == "object" && typeof addon == "object"){
			var ret = base;
			(function(B,A){
				for(var i in A){
					if(i in B){
						if((typeof B[i] == "object" && typeof A[i] == "object") && A[i].nodeType != 1) arguments.callee(B[i],A[i]);
						else if(override) B[i] = A[i];
					}
					else{
						B[i] = A[i];
					}
				}
			})(ret,addon);
			return ret;
		}
		else{
			return base;
		}
	};
	
	COM.prototype.HighestDepth = function(){
		var n = (arguments.length > 0 && !isNaN(arguments[0])) ? arguments[0] : 0 ;
		var Wrap = this;
		this.value = new Number(n);
		var Substance = this.value;
		for(var i in Wrap)(function(prop){
			
			if(Wrap[prop] instanceof Function)(function(name,method){
				Substance[name] = function(){
					return method.apply(Substance,arguments);
				};
			})(prop,Wrap[prop]);
		})(i);
		return this.value;
	};
	COM.prototype.HighestDepth.prototype = {
		refresh : function(){
			var root = (arguments.length > 0 && arguments[0].nodeType == 1) ? arguments[0] : document.body , d = 0;
			(function(el){
				var cn = el.childNodes;
				for(var i=0 , l=cn.length ; i<l ; i++){
					var elem = cn[i];
					if(elem.nodeType == 1){
						var z = (function(){
							var st = null;
							if(common._browser.nav == "MSIE") st =  elem.currentStyle;
							else st = document.defaultView.getComputedStyle(elem,"");
							return (st && st.zIndex && !isNaN(st.zIndex)) ? st.zIndex - 0 : 0;
						})();
						if(z > d) d = z;
						if(elem.childNodes && elem.childNodes.length > 0) arguments.callee(elem);
					}
				}
			})(root);
			return new common.HighestDepth(d);
		}
	};
	this._startup_items.push(function(){ common._highestdepth = new common.HighestDepth(); });
	
	COM.prototype.isArray = function(array){
		return !(
			!array || 
			(!array.length || array.length == 0) || 
			typeof array !== 'object' || 
			!array.constructor || 
			array.nodeType || 
			array.item
		);
	};
	
	COM.prototype.getCurrentScript = function(){
		var ret = null;
		try{
			(function(obj){
				if(obj.nodeName.toLowerCase() == "script") ret = obj;
				else arguments.callee(obj.lastChild);
			})(document);
		}catch(e){
			common.E("script").each(function(index,item){
				if(item.src.indexOf(common._scriptName) != -1) ret = item.obj;
			});
		};
		return ret;
	};
	
	COM.prototype.getScreenInfo = function(){
		function info(){
			this.page   = { width : 0, height : 0 };
			this.window = { width : 0, height : 0 };
			this.scroll = { left : 0, top : 0 };
			var style = document.body.currentStyle || document.defaultView.getComputedStyle(document.body,"") ,
				m = parseInt(style.marginLeft) + parseInt(style.marginRight);
			if (window.innerHeight && window.scrollMaxY) {
				this.page.width  = document.body.scrollWidth + m;
				this.page.height = window.innerHeight + window.scrollMaxY;
			}
			else if (document.body.scrollHeight > document.body.offsetHeight){
				this.page.width  = document.body.scrollWidth;
				this.page.height = document.body.scrollHeight;
			}
			else {
				this.page.width  = document.body.offsetWidth + m;
				this.page.height = document.body.offsetHeight;
			};
			if(self.innerWidth){
				this.window.width  = self.innerWidth;
				this.window.height = self.innerHeight;
			}
			else if(document.documentElement && document.documentElement.clientWidth){
				this.window.width  = document.documentElement.clientWidth;
				this.window.height = document.documentElement.clientHeight;
			}
			else{
				this.window.width  = document.body.clientWidth;
				this.window.height = document.body.clientHeight;
			};
			if(self.pageYOffset){
				this.scroll.left = self.pageXOffset;
				this.scroll.top  = self.pageYOffset;
			}
			else if(document.documentElement && document.documentElement.scrollTop){
				this.scroll.left = document.documentElement.scrollLeft;
				this.scroll.top  = document.documentElement.scrollTop;
			}
			else{
				this.scroll.left = document.body.scrollLeft;
				this.scroll.top  = document.body.scrollTop;
			};
			if(this.page.height < this.window.height){
				this.page.height = this.window.height;
			};
		};
		return new info();
	};
	
	COM.prototype.empty = function(obj){
		var ret = true ,
			opt = (arguments.length > 1 && arguments[1] === true) ? true : false ;
		if(!obj){
			return undefined;
		}
		else if(common.isArray(obj)){
			ret = (obj.length == 0);
		}
		else if(obj.nodeType == 1 && obj.childNodes.length != 0){
			if(opt){
				ret = false;
			}
			else{
				for(var i=0 , l=obj.childNodes.length ; i<l ; i++){
					if(obj.childNodes[i].nodeType == 1){
						ret = false;
						break;
					}
				}
			}
		};
		return ret;
	};
	
	COM.prototype.DeBug = function(){
		function DeBugWindow(obj){
			var D = this ,
				screenInfo = common.getScreenInfo();
			this.obj = obj;
			this.w = 0;
			this.h = 0;
			this.x = 10;
			this.y = 10;
			this.xscale = (common._debug_size && !isNaN(common._debug_size[0]) && common._debug_size[0] < screenInfo.window.width)  ? common._debug_size[0] / screenInfo.window.width  : 0.5;
			this.yscale = (common._debug_size && !isNaN(common._debug_size[1]) && common._debug_size[1] < screenInfo.window.height) ? common._debug_size[1] / screenInfo.window.height : 0.3;
			this.ResetProperty();
			this.Init();
			common._onresize_items.push(function(){
				D.ResetProperty();
				D.Init();
			});
		};
		DeBugWindow.prototype = {
			ResetProperty : function(){
				var screenInfo = common.getScreenInfo();
				this.w = (common._debug_size && !isNaN(common._debug_size[0])) ? Math.min(common._debug_size[0],screenInfo.window.width * this.xscale)  : screenInfo.window.width * this.xscale;
				this.h = (common._debug_size && !isNaN(common._debug_size[1])) ? Math.min(common._debug_size[1],screenInfo.window.height * this.yscale) : screenInfo.window.height * this.yscale;
				this.x = 10;
				this.y = 10;
			},
			Init : function(){
				this.obj.style.position = "fixed";
				common.setStyle(this.obj,{
					width : this.w + "px",
					height : this.h + "px",
					opacity : 0.7,
					zIndex : 65535
				});
				if(common._debug_position.indexOf("top") != -1){
					common.setStyle(this.obj,{
						top : this.y + "px"
					});
				};
				if(common._debug_position.indexOf("bottom") != -1){
					common.setStyle(this.obj,{
						bottom : this.y + "px"
					});
				};
				if(common._debug_position.indexOf("left") != -1){
					common.setStyle(this.obj,{
						left : this.x + "px"
					});
				};
				if(common._debug_position.indexOf("right") != -1){
					common.setStyle(this.obj,{
						right : this.x + "px"
					});
				};
				if(!common._debug_position || common._debug_position){
					common.setStyle(this.obj,{
						right : this.x + "px",
						bottom : this.y + "px"
					});
				};
			},
			write : function(str){
				if(!common._debug_mode) return;
				this.obj.value += str + "\n";
			},
			clear : function(){
				if(!common._debug_mode) return;
				this.obj.value = "";
			}
		};
		var DBW = null;
		if(common._debug_mode){
			if(!document.getElementById("debug-window")){
				DBW = document.createElement("textarea");
				DBW.id = "debug-window";
				document.body.appendChild(DBW);
			}
			else{
				DBW = document.getElementById("debug-window");
			};
			common._debugger = new DeBugWindow(DBW);
		};
	};
	this._startup_items.push(this.DeBug);
	
	COM.prototype.randStr = function(){
		var arg = new common.Array(); arg.push.apply(arg,arguments);
		var l = (arg.length > 0 && !isNaN(arg[0])) ? arg[0] : 8 ,
			let = ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + ((arg.length > 1 && typeof arg[1] == "string") ? arg[1] : "")).split("") ,
			n = let.length,
			i = 0,
			ret = "";
		
		for(; i<l ; i++) ret += let[Math.floor(Math.random() * n)];
		return new common.String(ret);
	};
	
	COM.prototype.puWindow = function(url,nam,wid,hei,prop){
		wid = (wid <= window.screen.width)  ? wid : window.screen.width  * 0.8 ;
		hei = (hei <= window.screen.height) ? hei : window.screen.height * 0.8 ;
		var offset = 0 , w = window.screen.width , h = window.screen.height , l = (w-wid)/2 , t = ((h-hei)/2)-offset;
		sty = prop + ",width=" + wid + ",height=" + hei + ",left=" + l + ",top=" + t;
		return window.open(url,nam,sty);
	};
	COM.prototype.popup0 = function(url,nam,wid,hei){
		return this.puWindow(url,nam,wid,hei,"status=no,scrollbars=no,resizable=no");
	};
	COM.prototype.popup1 = function(url,nam,wid,hei){
		return this.puWindow(url,nam,wid,hei,"status=yes,scrollbars=yes,resizable=yes");
	};
	
	COM.prototype.getUrlInfo = function(){
		function info(url){
			var sect = [] , tmp1 = url.split("#") , tmp2 = tmp1[0].split("?");
			sect[0] = tmp2[0];
			sect[1] = tmp2[1];
			sect[2] = tmp1[1];
			var slashed = sect[0].split("/") , scheme_patern = /([a-z]+):/;
			this.scheme = (url.match(scheme_patern)) ? url.match(scheme_patern)[1] : null;
			this.host = (slashed[2].indexOf("@") != -1) ? slashed[2].split("@")[1] : slashed[2] ;
			this.userName = (slashed[2].indexOf("@") != -1) ? slashed[2].split("@")[0].split(":")[0] : null;
			this.passphrase = (slashed[2].indexOf("@") != -1) ? slashed[2].split("@")[0].split(":")[1] : null;
			var dir_str = "" , dir_arr = [];
			(function(){
				for(var i=3 , l=slashed.length-1 ; i<l ; i++){
					dir_str += "/" + slashed[i];
					dir_arr.push(slashed[i]);
				};
				dir_str += "/";
			})();
			this.directory = { string : dir_str, array : dir_arr, length : dir_arr.length };
			this.file = slashed[slashed.length - 1].split("#")[0].split("?")[0];
			if(this.file == "") this.file = null;
			this.path = (this.file) ? this.directory.string + this.file : this.directory.string ;
			this.hash = (sect[2]) ? sect[2] : null ;
			this.query = { string : (sect[1]) ? sect[1] : null, array : null, length : 0 } ;
			if(this.query.string){
				this.query.array = {};
				var q_tmp_1 = this.query.string.split("&");
				for(var i=0 , l=q_tmp_1.length ; i<l ; i++){
					var q_tmp_2 = q_tmp_1[i].split("=");
					this.query.array[q_tmp_2[0]] = q_tmp_2[1];
				};
				this.query.length = q_tmp_1.length;
			};
		};
		return new info( (arguments.length > 0) ? arguments[0] : window.location.href );
	};
	
	COM.prototype.setStyle = function(obj,style){
		if(!obj) return;
		for(var i in style){
			if(i.indexOf("-") != -1){ i = i.replace(/\-([\w])/g,function($0,$1){ return $1.toUpperCase(); }); }
			if(common._browser.nav == "MSIE"){
				if(i == "top"){ obj.style.posTop = parseInt(style[i]); }
				else if(i == "bottom" ){ obj.style.posBottom   = parseInt(style[i]); }
				else if(i == "left"   ){ obj.style.posLeft     = parseInt(style[i]); }
				else if(i == "right"  ){ obj.style.posRight    = parseInt(style[i]); }
				else if(i == "width"  ){
					if(/auto|inherit/.test(style[i])) obj.style.width = style[i];
					else obj.style.pixelWidth  = parseInt(style[i]);
				}
				else if(i == "height" ){
					if(/auto|inherit/.test(style[i])) obj.style.height = style[i];
					else obj.style.pixelHeight = parseInt(style[i]);
				}
				else if(i == "opacity"){
					if(obj.parentNode) obj.style.filter = obj.currentStyle.filter;
					var pattern = /alpha\(opacity=[^\)]+\)/ , new_alpha_str = "alpha(opacity=" + (style[i] * 100) + ")";
					if(pattern.test(obj.style.filter)){ obj.style.filter = obj.style.filter.replace(pattern,new_alpha_str); }
					else{ obj.style.filter += "\n" + new_alpha_str; }
				}
				else if(i == "backgroundImage" && /.*?\.png[\'\"]?\)$/i.test(style[i]) && common._browser.ver.major < 7){
					if(obj.parentNode) obj.style.filter = obj.currentStyle.filter;
					var pattern = /progid:DXImageTransform.Microsoft.AlphaImageLoader\([^\)]+\)/ ,
						src = style[i].match(/url\(["']?([^\'\"\)]+)['"]?\)/)[1],
						new_ail_str = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='image', src='" + src + "')";
					if(pattern.test(obj.style.filter)) obj.style.filter = obj.style.filter.replace(pattern,new_ail_str);
					else obj.style.filter += "\n" + new_ail_str;
				}
				else if(i == "filter"){
					if(obj.parentNode) obj.style.filter = obj.currentStyle.filter;
					var name = style[i].split(":")[0] , pattern = new RegExp(name + ":([^\r\n]+)");
					if(pattern.test(obj.style.filter)) obj.style.filter = obj.style.filter.replace(pattern,style[i]);
					else obj.style.filter += "\n" + style[i];
				}
				else if(i == "float"){ obj.style.styleFloat = style[i]; }
				else{ obj.style[i] = style[i]; }
			}
			else{
				if(i == "float"){ obj.style.cssFloat = style[i]; }
				else obj.style[i] = style[i];
			};
		}
	};
	
	COM.prototype.getOffsetPosition = function(obj){
		var ret = { offset : { left : 0, top  : 0 }, absolute : { left : 0, top : 0 } };
		function getOffset(obj){
			var ret = { left : 0, top  : 0 };
			if(common._browser.nav != "MSIE"){
				ret.left = obj.offsetLeft;
				ret.top  = obj.offsetTop;
			}
			else{
				(function(obj){
					var f = arguments.callee;
					ret.left += obj.offsetLeft;
					ret.top  += obj.offsetTop;
					try{
						if(obj.offsetParent){
							var op_style = obj.offsetParent.currentStyle;
							if(op_style.position == "static"){
								f(obj.offsetParent);
							}
						}
					}
					catch(e){}
				})(obj);
			};
			return ret;
		};
		ret.offset.left = getOffset(obj).left;
		ret.offset.top  = getOffset(obj).top;
		(function(obj){
			var f = arguments.callee , o = getOffset(obj);
			ret.absolute.left += o.left;
			ret.absolute.top  += o.top;
			(function(obj){
				var g = arguments.callee;
				if(obj.parentNode && obj.parentNode.nodeName != "HTML"){
					var p = obj.parentNode , style = p.currentStyle || document.defaultView.getComputedStyle(p,"");
					if(p.nodeName == "TABLE" || p.nodeName == "TR" || p.nodeName == "TD" || p.nodeName == "TH" || p.nodeName == "CAPTION"){
						if(common._browser.nav == "MSIE"){
							g(p);
						}
						else if(p == obj.offsetParent){
							f(p);
						}
						else{
							g(p);
						}
					}
					else if(style.position != "static"){
						f(p);
					}
					else{
						g(p);
					}
				}
			})(obj)
		})(obj);
		return ret;
	};
	
	COM.prototype.createGetString = function(param){
		var str = "";
		for(var i in param){
			str += (str == "") ? "" : "&" ;
			str += i + "=" + param[i];
		};
		return str;
	};
	
	COM.prototype.fade = function(obj){
		function Fade(obj){
			this.obj = obj;
			this.style = obj.currentStyle || document.defaultView.getComputedStyle(obj,'');
			this.alpha = 100;
			this.timerID = null;
			this.getAlpha();
		};
		Fade.prototype = {
			setAlpha : function(value){
				if(common._browser.nav == "MSIE"){
					this.obj.style.filter = "alpha(opacity=" + value + ")";
				}
				else{
					this.obj.style.opacity = value / 100;
				};
				this.alpha = value;
			},
			getAlpha : function(){
				if(common._browser.nav == "MSIE"){
					var tmp = this.style.filter.match(/alpha\(opacity=([0-9]+)\)/);
					this.alpha = (tmp) ? tmp[1] : 100;
				}
				else{
					this.alpha = this.style.opacity * 100;
				};
			},
			In : function(){
				var a = (arguments.length > 0) ? arguments[0] : 5 ;
				var callback = (arguments.length > 1) ? arguments[1] : false ;
				this.To(100,a,callback);
			},
			Out : function(){
				var a = (arguments.length > 0) ? arguments[0] : 5 , callback = (arguments.length > 1) ? arguments[1] : false ;
				this.To(0,a,callback);
			},
			To : function(value){
				var F = this , a = (arguments.length > 1) ? arguments[1] : 5 , callback = (arguments.length > 2 && typeof arguments[2] == "function") ? arguments[2] : false , pA = this.alpha , tA = value , dA = tA - pA , Dec = common.decelerate();
				Dec.Trigon(function(p){
					F.setAlpha(Math.floor(pA + dA * p));
				},a,callback);
			}
		};
		return new Fade(obj);
	};
	
	COM.prototype.createXMLHttpRequest = function(){
		var XMLhttpObject = null;
		try{
			XMLhttpObject = new XMLHttpRequest();
		}
		catch(e){
			try{
				XMLhttpObject = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch(e){
				try{
					XMLhttpObject = new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch(e){
					return null;
				}
			}
		};
		return XMLhttpObject;
	};
	
	COM.prototype.crawl = function(){
		function Crawler(){
			this.XHR = common.createXMLHttpRequest();
			this.response = {
				text : null, xml : null
			};
		};
		Crawler.prototype = {
			Load : function(url){
				var L = this , callback = (arguments.length > 1 && typeof arguments[1] == "function") ? arguments[1] : false  , errorfunc = (arguments.length > 2 && typeof arguments[2] == "function") ? arguments[2] : false ;
				this.XHR.open("GET",url,true);
				this.XHR.send(null);
				function DO(){
					if(L.XHR.responseText && L.XHR.status == 200){
						L.response.text = L.XHR.responseText;
						L.response.xml  = L.XHR.responseXML;
						if(callback) callback(L.response);
					}
					else{
						if(errorfunc) errorfunc();
					}
				}
				if(L.XHR.readyState == 4 && L.XHR.responseText) DO();
				else L.XHR.onreadystatechange = function(){ if(L.XHR.readyState == 4 && L.XHR.responseText){ DO(); } };
			},
			Post : function(url){
				if(arguments.length < 2){ this.Load(url); return; };
				var P = this , dat = this.CreateData(arguments[1]) , callback = (arguments.length > 2 && typeof arguments[2] == "function") ? arguments[2] : false  , errorfunc = (arguments.length > 3 && typeof arguments[3] == "function") ? arguments[3] : false ;
				this.XHR.open("POST",url,true);
				this.XHR.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
				this.XHR.send(dat);
				function DO(){
					if(P.XHR.status == 200){
						P.response.text = P.XHR.responseText;
						P.response.xml  = P.XHR.responseXML;
						if(callback) callback(P.response);
					}
					else{
						if(errorfunc) errorfunc();
					}
				}
				if(P.XHR.readyState == 4 && P.XHR.responseText) DO();
				else P.XHR.onreadystatechange = function(){ if(P.XHR.readyState == 4 && P.XHR.responseText){ DO(); } };
			},
			CreateData : function(dat){
				var C = this;
				if(dat.nodeType == 1 && dat.nodeName == "FORM"){
					var ret_obj = {} , ret_str = "";
					if(!dat.isCE) dat = common.A(dat);
					
					dat.E("input").each(function(index,item){
						if(!item.name) return;
						
						if(item.type == "text") ret_obj[item.obj.name] = encodeURI(item.value.replace("&","&amp;"));
						else if(item.type == "password") ret_obj[item.name] = encodeURI(item.value.replace("&","&amp;"));
						else if(item.type == "radio" && item.checked == true) ret_obj[item.name] = encodeURI(item.value.replace("&","&amp;"));
						else if(item.type == "hidden") ret_obj[item.name] = encodeURI(item.value.replace("&","&amp;"));
						else if(item.type == "submit") ret_obj[item.name] = encodeURI(item.value.replace("&","&amp;"));
						else if(item.type == "button") ret_obj[item.name] = encodeURI(item.value.replace("&","&amp;"));
						else if(item.type == "image") ret_obj[item.name] = encodeURI(item.value.replace("&","&amp;"));
						else if(item.type == "checkbox" && item.checked == true){
							if(ret_str != "") ret_str += "&";
							ret_str += item.name + "=" + encodeURI(item.value.replace("&","&amp;"));
						}
					});
					
					dat.E("select").each(function(index,item){
						if(!item.name) return;
						item.E("option").each(function(index,opt){
							if(opt.selected == true){
								if(ret_str != "") ret_str += "&";
								ret_str += item.name + "=" + encodeURI(opt.value.replace("&","&amp;"));
							}
						});
					});
					
					dat.E("textarea").each(function(index,item){
						if(!item.name) return;
						ret_obj[item.name] = encodeURI(item.value.replace("&","&amp;"));
					});
					
					
					
					if(ret_str != "") ret_str += "&";
					ret_str += common.createGetString(ret_obj);
					return ret_str;
				}
				else{
					return common.createGetString(dat);
				}
			}
		};
		return new Crawler();
	};
	COM.prototype.B = common.crawl;
	
	COM.prototype.scroll = function(){
		function Scroll(){
			this.obj = (arguments.length > 0) ? arguments[0] : window ;
			this.dec = common.decelerate();
			this.timerID = null;
		};
		Scroll.prototype = {
			To : function(){
				var S = this , screenInfo = common.getScreenInfo() , pX = screenInfo.scroll.left , pY = screenInfo.scroll.top;
				var tX = (arguments[0] == "undefined" || isNaN(arguments[0])) ? pX : arguments[0] ;
				if(tX > screenInfo.page.width)  tX = screenInfo.page.width;
				var tY = (arguments[1] == "undefined" || isNaN(arguments[1])) ? pY : arguments[1] ;
				if(tY > screenInfo.page.height) tY = screenInfo.page.height;
				var dX = tX - pX , dY = tY - pY;
				var a = (arguments.length > 2 && !isNaN(arguments[2])) ? arguments[2] : 5 ;
				if(a > 1) a = 1 / a;
				var callback = (arguments.length > 3 && typeof arguments[3] == "function") ? arguments[3] : false ;
				this.dec.Stop();
				this.dec.HardBrake(function(p){
					var x = pX + dX * p , y = pY + dY * p;
					S.obj.scrollTo(x,y);
				},a,callback);
			}
		};
		var obj = (arguments.length > 0) ? arguments[0] : window ;
		return new Scroll(obj);
	};
	
	COM.prototype.mailto2link = function (){
		function Span(element){
			var S = this;
			this.obj = element;
			this.address = null;
			this.Init();
		};
		Span.prototype = {
			Init : function(){
				var S = this;
				this.address = (function(){
					if(!S.obj.childNodes || S.obj.childNodes.length < 1) return null;
					if(S.obj.childNodes[0].nodeName == "IMG"){ return S.obj.childNodes[0].alt; }
					else{ return S.obj.childNodes[0].nodeValue; }
				})();
				if(this.address) common.bind(this.obj,"click",function(){ window.location.href = "mailto:" + S.address; });
			}
		};
		var span = [];
		common.getElementsBySelector("span." + common._mailto_className).each(function(index,item){ span.push(new Span(item)); });
		
		
	};
	this._startup_items.push(this.mailto2link);
	
	COM.prototype.decelerate = function(){
		function Decelerate(){
			this.available = true;
			this.timerID = null;
		};
		Decelerate.prototype = {
			Trigon : function(){
				var func = (arguments.length > 0 && typeof arguments[0] == "function") ? arguments[0] : function(arg){ common._debugger.write(arg); }  , T = (arguments.length > 1 && !isNaN(arguments[1])) ? arguments[1] : 1  , callback = (arguments.length > 2 && typeof arguments[2] == "function") ? arguments[2] : false  , p = 0 , t = 0 , D = this , start = new Date();
				(function(){
					t = (new Date().getTime() - start.getTime()) / 1000;
					p = Math.sin(Math.PI / 2 * (t / T));
					func(p);
					if(t < T && D.available){
						D.timerID = setTimeout(arguments.callee,10);
					}
					else{
						func(1);
						if(callback) callback();
					};
				})();
			},
			Liner : function(){
				var func = (arguments.length > 0 && typeof arguments[0] == "function") ? arguments[0] : function(arg){ trace(arg); }  , T = (arguments.length > 1 && !isNaN(arguments[1])) ? arguments[1] : 1  , callback = (arguments.length > 2 && typeof arguments[2] == "function") ? arguments[2] : false  , p = 0 , t = 0 , D = this , start = new Date();
				(function(){
					t = (new Date().getTime() - start.getTime()) / 1000;
					p = t / T;
					func(p);
					if(t < T && D.available){
						D.timerID = setTimeout(arguments.callee,10);
					}
					else{
						func(1);
						if(callback) callback();
					};
				})();
			},
			Physics : function(){
				var func = (arguments.length > 0 && typeof arguments[0] == "function") ? arguments[0] : function(arg){ trace(arg); }  , T = (arguments.length > 1 && !isNaN(arguments[1])) ? arguments[1] : 1  , callback = (arguments.length > 2 && typeof arguments[2] == "function") ? arguments[2] : false  , V = 2 / T  , a = 0 - V / T , p = 0 , t = 0 , D = this , start = new Date();
				(function(){
					t = (new Date().getTime() - start.getTime()) / 1000;
					p = 0.5 * a * Math.pow(t,2) + V * t;
					func(p);
					if(t < T && D.available){
						D.timerID = setTimeout(arguments.callee,10);
					}
					else{
						func(1);
						if(callback) callback();
					};
				})();
			},
			HardBrake : function(){
				var func = (arguments.length > 0 && typeof arguments[0] == "function") ? arguments[0] : function(arg){ trace(arg); }  , callback = (arguments.length > 2 && typeof arguments[2] == "function") ? arguments[2] : false  , p = 0 , t = 0 , D = this , a = (arguments.length > 1 && !isNaN(arguments[1])) ? arguments[1] : 5 ;
				if(a > 1) a = 1 / a;
				(function(){
					p += (1 - p) * a;
					if(Math.abs(1 - p) > 0.005 && D.available){
						func(p);
						D.timerID = setTimeout(arguments.callee,10);
					}
					else{
						func(1);
						if(callback) callback();
					};
				})();
			},
			OverShoot : function(){
				var func = (arguments.length > 0 && typeof arguments[0] == "function") ? arguments[0] : function(arg){ trace(arg); }  , T = (arguments.length > 1 && !isNaN(arguments[1])) ? arguments[1] : 1  , callback = (arguments.length > 2 && typeof arguments[2] == "function") ? arguments[2] : false  , V = 2 / T  , a = 0 - V / T , p = 0 , t = 0 , O = 1.3 , D = this , start = new Date();
				(function(){
					t = (new Date().getTime() - start.getTime()) / 1000;
					var s = 0.5 * a * Math.pow(t,2) + V * t;
					p = s + ((1 - s) * O * Math.sin(1 * Math.PI * (t / T)));
					func(p);
					if(t < T && D.available){
						D.timerID = setTimeout(arguments.callee,10);
					}
					else{
						func(1);
						if(callback) callback();
					};
				})();
			},
			Stop : function(){
				var callback = (arguments.length > 2 && typeof arguments[2] == "function") ? arguments[2] : false ;
				this.available = false;
				clearTimeout(this.timerID);
				this.available = true;
				if(callback) callback();
			}
		};
		return new Decelerate();
	};
	
	COM.prototype.SARI = function(element){
		var SR = this , pattern = /_f[12]\./;
		this.obj = element;
		
		this.f1 = document.createElement("img");
		this.f2 = document.createElement("img");
		this.f1.src = this.obj.src;
		this.f2.src = this.obj.src.replace(pattern,"_f2.");
		
		common.bind(this.f2,"load",this.SetEvent());
		common._SARI_object[this.obj.src] = this;
	};
	COM.prototype.SARI.prototype = {
		SetEvent : function(){
			var SR = this;
			
			return function(target){
				if(SR.obj.className.indexOf(common._SARI_className) == -1) return;
				common.bind(SR.obj,"mouseover",function(){ SR.Swap() });
				common.bind(SR.obj,"mouseout" ,function(){ SR.Restore() });
			}
		},
		Swap : function(){
			this.obj.src = this.f2.src;
		},
		Restore : function(){
			this.obj.src = this.f1.src;
		}
	};
	COM.prototype.SARI_setup = function(){
		common.getElementsBySelector((common._SARI_safemode == 0)?common._SARI_className:"img."+common._SARI_className+",input."+common._SARI_className).each(function(index,item){
			new common.SARI(item);
		});
	};
	this._startup_items.push(this.SARI_setup);
	
	
	COM.prototype.LBX = function(){
		
		var Arg = new common.Array(); Arg.push.apply(Arg,arguments);
		var L = this;
		
		this.stat = 0;
		this.jamElements = new common.Array();
		
		this.misc = common.marge({
			curtain : {
				alpha : 0.8,
				speed : 0.5,
				isCloser : false
			},
			shutter : {
				isStep : false,
				speed : 0.5,
				isAnime : true
			},
			viewer : {
				isAnime : true,
				speed : 0.5
			},
			closeButton : {
				type : "close",
				event : {
					click : function(){ L.Quit(); }
				},
				speed : 0.5
			},
			prevButton : {
				type : "step",
				speed : 0.5
			},
			nextButton : {
				type : "step",
				speed : 0.5
			},
			loading : {
				type : "loading",
				speed : 0.5,
				opacity : 1
			}
		},((Arg.length > 0 && typeof Arg[0] == "object") ? Arg[0] : {}),true);
		
		this.curtain = {
			obj : common.A(document.createElement("div")),
			dec : common.decelerate(),
			size : { w : 0 , h : 0 },
			pos : { x : 0 , y : 0 },
			opacity : 0,
			alpha : L.misc.curtain.alpha,
			speed : L.misc.curtain.speed,
			isCloser : L.misc.curtain.isCloser,
			style : { backgroundColor : "#000000" },
			Show : function(){
				var arg = new common.Array(); arg.push.apply(arg,arguments);
				var C = this,
					callback = (arg.length > 0 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
				
				L.HideJamElements();
				this.obj.setStyle({
					position : "absolute",
					zIndex : common._highestdepth + 1,
					opacity : 0
				});
				this.Resize();
				
				document.body.appendChild(this.obj);
				
				this.dec.Stop();
				this.dec.Trigon(function(p){
					var o = C.alpha * p;
					if(C.opacity <= o){
						C.obj.setStyle({ opacity : o });
						C.opacity = o;
					}
				},C.speed,function(){
					if(callback) callback();
				});
			},
			Hide : function(){
				var arg = new common.Array(); arg.push.apply(arg,arguments);
				var C = this,
					callback = (arg.length > 0 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
				
				this.dec.Stop();
				this.dec.Trigon(function(p){
					var o = C.alpha * (1 - p);
					if(C.opacity >= o){
						C.obj.setStyle({ opacity : o });
						C.opacity = o;
					}
				},C.speed,function(){
					if(callback) callback();
					C.obj.Delete();
					C.obj.setStyle({
						position : "absolute",
						zIndex : common._highestdepth + 1,
						top : "0px",
						left : "0px",
						opacity : 0
					});
					L.ShowJamElements();
				});
			},
			Resize : function(){
				var arg = new common.Array(); arg.push.apply(arg,arguments);
				var S = this,
					SI = common.getScreenInfo(),
					wid = (arg.length > 0 && arg[0] != null && !isNaN(arg[0])) ? arg[0] : SI.page.width,
					hei = (arg.length > 1 && arg[1] != null && !isNaN(arg[1])) ? arg[1] : SI.page.height, 
					callback = (arg.length > 0 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
				
				this.size.w = wid;
				this.size.h = hei;
				this.obj.setStyle({
					width : this.size.w + "px",
					height : this.size.h + "px",
					left : SI.scroll.left + "px"
				});
				if(callback) callback();
			},
			Init : function(){
				var arg = new common.Array(); arg.push.apply(arg,arguments);
				var C = this,
					misc = (arg.length > 0 && typeof arg[0] == "object") ? arg[0] : {} ;
				
				if(L.misc.curtain.alpha != undefined) this.alpha = (L.misc.curtain.alpha < 1) ? L.misc.curtain.alpha : L.misc.curtain.alpha / 100 ;
				if(L.misc.curtain.style != undefined) this.style = common.marge(this.style,L.misc.curtain.style,true);
				
				this.size = { w : 0 , h : 0 };
				this.pos = { x : 0 , y : 0 };
				this.opacity = 0;
				this.obj.setStyle({
					position : "absolute",
					zIndex : common._highestdepth + 1,
					top : "0px",
					left : "0px",
					opacity : 0
				});
				this.obj.setStyle(this.style);
				
				common._onresize_items.push(function(){ C.Resize(); });
				common._onscroll_items.push(function(){ C.Resize(); });
			}
		};
		
		function shutterButton(){
			var arg = new common.Array(); arg.push.apply(arg,arguments);
			var SB = this;
			
			
			this.misc = misc = (arg.length > 0 && typeof arg[0] == "object") ? arg[0] : {};
			this.obj = common.A(document.createElement((this.misc.nodeName) ? this.misc.nodeName : "div"));
			this.Mdec = common.decelerate();
			this.Sdec = common.decelerate();
			this.opacity = 0;
			this.stat = 0;
			this.speed = this.misc.speed;
			this.type = (this.misc.type && /close|step|loading/.test(this.misc.type)) ? this.misc.type : "close" ;
			this.position = (this.misc.position) ? this.misc.position : "top right outset";
			this.pos = { x : 0 , y : 0 };
			this.size = { w : 0 , h : 0 };
			this.style = common.marge({
				opacity : this.opacity,
				display : "inline",
				color : "#ffffff",
				cursor : "pointer",
				zIndex : common._highestdepth + 4,
				position : "absolute",
				left : "0px",
				top : "0px"
			},(this.misc.style)?this.misc.style:{},true);
			this.style = common.marge(this.style,(common._browser.nav == "MSIE") ? { zoom : 1 } : { display : "inline-block" });
			this.label = (function(){
				var ret = document.createTextNode(SB.type);
				if(SB.misc.label){
					if(SB.misc.label.nodeType == 1){
						var st = {
							padding : "0px",
							backgroundColor : "transparent"
						};
						SB.style = common.marge(SB.style,st);
						ret = (SB.misc.label.isCE) ? SB.misc.label : common.A(SB.misc.label) ;
						if(ret.nodeType == 1 && ret.nodeName == "IMG" && /_f[12]\./.test(ret.src))(function(){
							var f1 = document.createElement("img"); f1.src = ret.src.replace(/_f[12]\./,"_f1.");
							var f2 = document.createElement("img"); f2.src = ret.src.replace(/_f[12]\./,"_f2.");
							ret.addEventListener("mouseover",function(){ ret.src = f2.src });
							ret.addEventListener("mouseout" ,function(){ ret.src = f1.src });
						})()
					}
					else if(typeof SB.misc.label == "string"){
						if(/.*?\.(gif|jpg|png)$/.test(SB.misc.label)){
							var img = common.A(document.createElement("img"));
							var st = {
								height : "0px",
								padding : "0px",
								backgroundColor : "transparent",
								overflow : "hidden"
							};
							img.addEventListener("load",function(){
								st["width"] = img.width + "px";
								st["paddingTop"] = img.height + "px";
								st["backgroundImage"] = "url(" + img.src + ")";
								SB.style = common.marge(SB.style,st);
								SB.obj.setStyle(SB.style);
							});
							img.src = SB.misc.label;
							if(/_f[12]\./.test(img.src))(function(){
								var f1 = document.createElement("img"); f1.src = img.src.replace(/_f[12]\./,"_f1.");
								var f2 = document.createElement("img"); f2.src = img.src.replace(/_f[12]\./,"_f2.");
								SB.obj.addEventListener("mouseover",function(){ SB.obj.setStyle({ backgroundImage : "url(" + f2.src + ")" }); });
								SB.obj.addEventListener("mouseout" ,function(){ SB.obj.setStyle({ backgroundImage : "url(" + f1.src + ")" }); });
							})();
						}
						else{
							ret.nodeValue = SB.misc.label;
						}
					}
				}
				return ret;
			})();
			
			this.obj.append(this.label);
			if(this.misc.event){
				for(var i in this.misc.event){
					this.obj.addEventListener(i,this.misc.event[i]);
				}
			}
			
		};
		shutterButton.prototype = {
			Show : function(){
				var arg = new common.Array(); arg.push.apply(arg,arguments);
				var SB = this,
					callback = (arg.length > 0 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
				if(!this.obj.parentNode) document.body.appendChild(this.obj);
				this.Sdec.Stop();
				
				if(this.type == "loading"){
					this.obj.Delete();
					this.obj.setStyle({ opacity : 1 });
					this.opacity = 1;
					document.body.appendChild(this.obj);
					if(callback) callback;
				}
				else{
					this.Sdec.Trigon(function(p){
						var o = p;
						if(SB.opacity <= o){
							SB.obj.setStyle({ opacity : o });
							SB.opacity = o;
						}
					},this.speed,callback);
				}
			},
			Hide : function(){
				var arg = new common.Array(); arg.push.apply(arg,arguments);
				var SB = this,
					callback = (arg.length > 0 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
				this.Sdec.Stop();
				this.Sdec.Trigon(function(p){
					var o = 1 - p;
					if(SB.opacity >= o){
						SB.obj.setStyle({ opacity : o });
						SB.opacity = o;
					}
				},this.speed,function(){
					SB.Delete();
					if(callback) callback();
				});
			},
			Delete : function(){
				this.obj.Delete();
				this.opacity = 0;
				this.pos = { x : 0 , y : 0 };
				this.obj.setStyle(this.style);
			},
			MoveTo : function(){
				var arg = new common.Array(); arg.push.apply(arg,arguments);
				var SB = this,
					t = (arg.length > 0 && typeof arg[0] == "object") ? arg[0] : { x : this.pos.x , y : this.pos.y , w : 0 , h : 0 },
					isAnime = (arg.length > 1 && arg[1] == true) ? true : false ,
					SI = common.getScreenInfo(),
					callback = (arg.length > 0 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
				
				if(this.type == "close"){
					var posV = this.position.toLowerCase().match(/top|bottom/i) || "bottom";
					var posH = this.position.toLowerCase().match(/center|left|right/i) || "center";
					var posA = this.position.toLowerCase().match(/inset|outset/i) || "outset";
				}
				else{
					var posV = this.position.toLowerCase().match(/top|center|bottom/i) || "center";
					var posH = this.position.toLowerCase().match(/left|right/i) || "left";
					var posA = this.position.toLowerCase().match(/inset|outset/i) || "outset";
				}
				
				if(this.obj.parentNode != document.body) document.body.appendChild(this.obj);
				
				tX = (function(){
					if(SB.type == "close"){
						if(posH == "left") return t.x;
						else if(posH == "right") return t.x + t.w - SB.obj.offsetWidth;
						else return t.x + (t.w - SB.obj.offsetWidth) / 2;
					}
					else if(SB.type == "step"){
						if(posA == "outset"){
							if(posH == "left") return t.x - SB.obj.offsetWidth;
							else return t.x + t.w;
						}
						else{
							if(posH == "left") return t.x;
							else return t.x + t.w - SB.obj.offsetWidth;
						}
					}
					else if(SB.type == "loading"){
						return (SI.window.width - SB.obj.offsetWidth) / 2 + SI.scroll.left;
					}
				})();
				tY = (function(){
					if(SB.type == "close"){
						if(posA == "outset"){
							if(posV == "top") return t.y - SB.obj.offsetHeight;
							else return t.y + t.h;
						}
						else{
							if(posV == "top") return t.y;
							else return t.y + t.h - SB.obj.offsetHeight;
						}
					}
					else if(SB.type == "step"){
						if(posV == "top") return t.y;
						else if(posV == "bottom") return t.y + t.h - SB.obj.offsetHeight;
						else return t.y + (t.h - SB.obj.offsetHeight) / 2;
					}
					else if(SB.type == "loading"){
						return SI.scroll.top + SI.window.height * 0.3;
					}
				})();
				
				if(isAnime){
					var p = { x : this.pos.x , y : this.pos.y };
					var t = { x : tX , y : tY };
					var d = { x : t.x - p.x , y : t.y - p.y };
					this.Mdec.Stop();
					this.Mdec.Trigon(function(P){
						var x = p.x + d.x * P;
						var y = p.y + d.y * P;
						SB.obj.setStyle({
							left : x + "px",
							top  : y + "px"
						});
						SB.pos.x = x;
						SB.pos.y = y;
					},0.5,callback);
				}
				else{
					this.pos.x = tX;
					this.pos.y = tY;
					this.obj.setStyle({
						left : this.pos.x + "px",
						top  : this.pos.y + "px"
					});
				}
			},
			Init : function(){
				var arg = new common.Array(); arg.push.apply(arg,arguments);
				var SB = this,
					callback = (arg.length > 0 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
				
				
				this.obj.setStyle(this.style);
			}
		};
		
		this.shutter = {
			obj : common.A(document.createElement("div")),
			dec : common.decelerate(),
			size : { w : 0 , h : 0 },
			pos : { x : 0 , y : 0 },
			speed : L.misc.shutter.speed,
			opacity : 0,
			offset : common.marge({ top : 30 , right : 0 , bottom : 20 , left : 0 },(L.misc.shutter.offset)?L.misc.shutter.offset:{},true),
			style : (L.misc.shutter.style) ? L.misc.shutter.style : {},
			isStep : (L.misc.shutter.isStep && L.misc.shutter.isStep == true) ? true : false ,
			isAnime : (L.misc.shutter.isAnime && L.misc.shutter.isAnime == true) ? true : false ,
			closeButton : new shutterButton(L.misc.closeButton),
			prevButton : new shutterButton(L.misc.prevButton),
			nextButton : new shutterButton(L.misc.nextButton),
			loading : new shutterButton(L.misc.loading),
			Show : function(){
				var arg = new common.Array(); arg.push.apply(arg,arguments);
				var S = this,
					SI = common.getScreenInfo(),
					dat = (arg.length > 0 && typeof arg[0] == "object") ? arg[0] : {},
					callback = (arg.length > 0 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
				
				this.pos.x = SI.window.width / 2 + this.offset.left;
				this.pos.y = this.offset.top + SI.scroll.top;
				this.obj.setStyle({ left : this.pos.x + "px", top : this.pos.y + "px" });
				this.obj.setStyle(this.style);
				
				document.body.appendChild(this.obj);
				document.body.appendChild(this.closeButton.obj);
				
				if(callback) callback();
			},
			Hide : function(){
				var arg = new common.Array(); arg.push.apply(arg,arguments);
				var S = this,
					callback = (arg.length > 0 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
				
				this.obj.setStyle({ opacity : 0 });
				this.opacity = 0;
				
				if(com._browser.nav == "MSIE"){
					this.obj.outerHTML = "";
				}
				else{
					this.obj.Delete();
				}
				
				this.Init();
				
				if(callback) callback();
			},
			Resize : function(){
				var arg = new common.Array(); arg.push.apply(arg,arguments);
				var S = this,
					SI = common.getScreenInfo(),
					wid = (arg.length > 0 && !isNaN(arg[0])) ? arg[0] : 0,
					hei = (arg.length > 1 && !isNaN(arg[1])) ? arg[1] : 0, 
					callback = (arg.length > 0 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
				
				this.dec.Stop();
				var p = { w : this.size.w , h : this.size.h , x : this.pos.x , y : this.pos.y };
				var t = { w : wid , h : hei , x : (SI.window.width - wid) / 2 + SI.scroll.left + this.offset.left ,  y : this.offset.top + SI.scroll.top };
				var d = { w : t.w - p.w , h : t.h - p.h , x : t.x - p.x , y : t.y - p.y };
				
				if(t.x + t.w + S.offset.right > L.curtain.size.w) L.curtain.Resize(t.x + t.w + S.offset.right,null);
				if(t.y + t.h + S.offset.bottom > L.curtain.size.h) L.curtain.Resize(null,t.y + t.h + S.offset.bottom);
				
				this.closeButton.MoveTo(t,(this.closeButton.opacity !== 0) ? true : false);
				if(this.isStep) this.prevButton.MoveTo(t,(this.prevButton.opacity !== 0) ? true : false);
				if(this.isStep) this.nextButton.MoveTo(t,(this.nextButton.opacity !== 0) ? true : false);
				
				if(this.opacity < 1) this.obj.setStyle({ opacity : 1 });
				
				if(this.isAnime){
					this.dec.Trigon(function(n){
						S.size.w = p.w + d.w * n;
						S.pos.x = p.x + d.x * n;
						S.obj.setStyle({
							width : S.size.w + "px",
							left : S.pos.x + "px"
						});
					},S.speed,function(){
						S.dec.Trigon(function(m){
							S.size.h = p.h + d.h * m;
							S.pos.y = p.y + d.y * m;
							S.obj.setStyle({
								height : S.size.h + "px",
								top : S.pos.y + "px"
							});
						},S.speed,function(){
							if(S.closeButton.opacity === 0) S.closeButton.Show();
							if(callback) callback();
						});
					});
				}
				else{
					this.obj.setStyle({
						width : t.w + "px",
						height : t.h + "px",
						left : t.x + "px",
						top : t.y + "px"
					});
					if(this.closeButton.opacity === 0) this.closeButton.Show();
					if(callback) callback();
				}
			},
			Init : function(){
				var arg = new common.Array(); arg.push.apply(arg,arguments);
				var S = this ,
					misc = (arg.length > 0 && typeof arg[0] == "object") ? arg[0] : {} ;
				
				this.size = { w : 0 , h : 0 };
				this.pos = { x : 0 , y : 0 };
				for(var i in misc) this[i] = misc[i];
				
				this.obj.setStyle({
					position : "absolute",
					zIndex : common._highestdepth + 2,
					left : this.pos.x + "px",
					top : this.pos.y + "px",
					width : this.size.w + "px",
					height : this.size.h + "px",
					overflow : "hidden",
					opacity : this.opacity
				});
				this.obj.setStyle(this.style);
			}
		};
		
		this.viewer = {
			obj : common.A(document.createElement("div")),
			dec : common.decelerate(),
			opacity : 1,
			speed : L.misc.viewer.speed,
			isAnime : L.misc.viewer.isAnime,
			isLoaded : false,
			Load : function(){
				if(arguments.length < 1) return;
				var arg = new common.Array(); arg.push.apply(arg,arguments);
				var V = this, 
					SI = common.getScreenInfo(),
					dat = (arg.length > 1 && typeof arg[1] == "object") ? arg[1] : {} ,
					callback = (arg.length > 1 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
				
				L.shutter.obj.append(this.obj);
				this.obj.setStyle({
					opacity : this.opacity
				});
				
				var src = (arg[0] != null) ? arg[0] : null; if(dat.src != undefined) src = dat.src;
				var wid = (dat.width  != undefined) ? parseInt(dat.width)  : 0;
				var hei = (dat.height != undefined) ? parseInt(dat.height) : 0;
				
				if(typeof src == "function"){
					src(callback);
				}
				else if(src.nodeType == 1){
					var content = (src.isCE) ? src : common.A(src);
					this.obj.append(content);
					if(content.readyState && !/complete|loaded/.test(content.readyState)){
						content.addEventListener("load",function(){
							V.isLoaded = true;
							L.shutter.Resize((wid) ? wid : content.offsetWidth,(hei) ? hei : content.offsetHeight,callback);
						});
					}
					else{
						this.isLoaded = true;
						L.shutter.Resize((wid) ? wid : content.offsetWidth,(hei) ? hei : content.offsetHeight,callback);
					}
				}
				else if(typeof src == "string"){
					if(/.*?(jpg|gif|png)$/.test(src)){
						var img = common.A(document.createElement("img"));
						var stage = common.A(document.createElement("div"));
						this.obj.append(stage);
						img.addEventListener("load",function(){
							V.isLoaded = true;
							stage.setStyle({
								width : ((wid) ? wid : img.width) + "px",
								height : ((hei) ? hei : img.height) + "px",
								backgroundImage : "url(" + src + ")",
								opacity : V.opacity
							});
							L.shutter.Resize((wid) ? wid : img.width,(hei) ? hei : img.height,callback);
						});
						img.src = src;
					}
					else{
						L.shutter.loading.MoveTo();
						L.shutter.loading.Show();
						
						var frame = common.A(document.createElement("iframe"));
						frame.setAtt("frameBorder","0");
						frame.frameBorder = 0;
						frame.src = src;
						this.obj.append(frame);
						frame.addEventListener("load",function(){
							V.isLoaded = true;
							L.shutter.loading.Hide();
							L.shutter.Resize((wid) ? wid : SI.window.width * 0.75,(hei) ? hei : SI.window.height * 0.75,function(){
								if(callback) callback();
							});
						});
						frame.setStyle({
							border : "0px",
							width : ((wid) ? wid : SI.window.width * 0.75) + "px",
							height : ((hei) ? hei : SI.window.height * 0.75) + "px"
						});
					}
				}
			},
			Show : function(){
				var arg = new common.Array(); arg.push.apply(arg,arguments);
				var V = this,
					content = this.obj.getChildElements(),
					callback = (arg.length > 0 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
				content = (content.length > 0) ? common.A(content[0]) : null;
				this.dec.Stop();
				this.dec.Trigon(function(p){
					var o = p;
					if(V.opacity <= o){
						V.obj.setStyle({ opacity : o });
						if(content) content.setStyle({ opacity : o });
						V.opacity = o;
					}
				},this.speed,callback);
			},
			Hide : function(){
				var arg = new common.Array(); arg.push.apply(arg,arguments);
				var V = this,
					content = this.obj.getChildElements(),
					callback = (arg.length > 0 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
				content = (content.length > 0) ? common.A(content[0]) : null;
				this.dec.Stop();
				this.dec.Trigon(function(p){
					var o = 1 - p;
					if(V.opacity >= o){
						V.obj.setStyle({ opacity : o });
						if(content) content.setStyle({ opacity : o });
						V.opacity = o;
					}
				},this.speed,function(){
					if(callback) callback();
				});
			},
			Clear : function(){
				var arg = new common.Array(); arg.push.apply(arg,arguments);
				var V = this,
					callback = (arg.length > 0 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
				this.obj.clearChildNodes();
				this.obj.Delete();
				this.opacity = 1;
				if(callback) callback();
			}
		};
		
		this.stat = 0;
		
		this.Init();
	};
	COM.prototype.LBX.prototype = {
		Init : function(){
			var L = this;
			
			if(this.curtain.isCloser === true) this.curtain.obj.onclick = function(){ L.Quit(); };
			this.curtain.Init();
			this.shutter.Init();
			this.shutter.closeButton.Init();
			this.shutter.prevButton.Init();
			this.shutter.nextButton.Init();
			this.shutter.loading.Init();
		},
		SetUp : function(){
			var arg = new common.Array(); arg.push.apply(arg,arguments);
			var L = this,
				callback = (arg.length > 1 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
			this.stat = 1;
			this.curtain.Show(0.5,function(){
				L.shutter.Show(callback);
			});
		},
		Show : function(src){
			this.viewer.Load(src);
//			this.viewer.Load(src,function(){  });
		},
		Quit : function(){
			var L = this;
			this.stat = 0;
			this.shutter.closeButton.Hide();
			if(this.shutter.isStep) this.shutter.prevButton.Hide();
			if(this.shutter.isStep) this.shutter.nextButton.Hide();
			this.viewer.Hide(function(){
				L.viewer.Clear(function(){
					L.shutter.Hide();
					L.curtain.Hide();
//					aaaaa;
				});
			});
		},
		Simple : function(src){
			var arg = new common.Array(); arg.push.apply(arg,arguments);
			var L = this,
				dat = (arg.length > 1 && typeof arg[1] == "object") ? arg[1] : {},
				callback = (arg.length > 0 && typeof arg.item(-1) == "function") ? arg.item(-1) : null ;
			this.stat = 1;
			common._highestdepth = common._highestdepth.refresh();
			this.curtain.Show(0.8,function(){
				L.shutter.Show(function(){
					L.viewer.Load(src,dat,function(){
						L.viewer.Show(callback);
					});
				});
			});
		},
		ShowJamElements : function(){
			this.jamElements.each(function(index,item){
				item.setStyle({ visibility : "visible" });
			});
			this.jamElements = new common.Array();
		},
		HideJamElements : function(){
			var L = this;
			var selector = (arguments.length > 0 && typeof arguments == "string") ? arguments[0] : "select" ;
			com.E(selector).each(function(index,item){
				L.jamElements.push(item);
				item.setStyle({ visibility : "hidden" });
			});
			if(com._browser.nav == "Firefox" && com._browser.plf.major == "MacOSX"){
				com.D("object").each(function(index,item){
					if(/flash/.test(item.outerHTML)){
						L.jamElements.push(item);
						item.setStyle({ visibility : "hidden" });
					}
				});
			}
		}
	};
	
	COM.prototype.LBXSet = function(){
		var arg = new common.Array(); arg.push.apply(arg,arguments);
		var L = this,
			dat = (arg.length > 0 && common.isArray(arg[0])) ? arg[0] : [];
		
		this.dat = new common.Array(); this.dat.push.apply(this.dat,dat);
		this.misc = common.marge({
			curtain : { alpha : 0.8, callback : null },
			shutter : { isStep : true, callback : null },
			load : { callback : null },
			viewer : { callback : null },
			prevButton : {
				event : {
					click : function(){ L.Step(-1); }
				}
			},
			nextButton : {
				event : {
					click : function(){ L.Step(1); }
				}
			}
		},((arg.length > 1 && typeof arg[1] == "object") ? arg[1] : {}),true);
		
		this.LBX = new common.LBX(this.misc);
		this.article = common.Array();
		this.current = 0;
		this.Init();
	};
	COM.prototype.LBXSet.prototype = {
		Init : function(){
			var L = this;
			this.dat.each(function(index,item){
				var target = item.keyObject;
				var src = item.src;
				var type = (!!item.type) ? item.type : "click";
				var dat = (!!item.dat) ? item.dat : {};
				var index = item.index;
				
				target.addEventListener(type,function(element,evt){
					common._highestdepth = common._highestdepth.refresh();
					L.LBX.Init(L.misc);
					L.LBX.curtain.Show(L.misc.curtain.alpha,function(){
						if(L.misc.curtain.callback) L.misc.curtain.callback();
						L.LBX.shutter.Show(function(){
							if(L.misc.shutter.callback) L.misc.shutter.callback();
							L.LBX.viewer.Load(src,dat,function(){
								L.current = index;
								if(L.misc.load.callback) L.misc.Load.callback();
								L.LBX.viewer.Show(function(){
									if(L.misc.viewer.callback) L.misc.viewer.callback();
								});
								if(L.dat.length > 1){
									if(index > 0) L.LBX.shutter.prevButton.Show();
									else L.LBX.shutter.prevButton.MoveTo({x:-5000,y:-5000,w:0,h:0});
									if(index < L.dat.length - 1) L.LBX.shutter.nextButton.Show();
									else L.LBX.shutter.nextButton.MoveTo({x:-5000,y:-5000,w:0,h:0});
								}
							});
						});
					});
					
					if(evt.preventDefault) evt.preventDefault();
					else event.returnValue = false;
				});
			});
		},
		Step : function(){
			var arg = new common.Array(); arg.push.apply(arg,arguments);
			var L = this,
				nextindex = (arg.length > 0 && !isNaN(arg[0])) ? (function(){
					if(L.current + arg[0] < 0) return 0;
					else if(L.current + arg[0] > L.dat.length - 1) return L.dat.length - 1;
					else return L.current + arg[0];
				})() : 0 ,
				callback = (arg.length > 0 && typeof arg.item(-1) == "function") ? arg.item(-1) : null;
			
			if(nextindex === 0) L.LBX.shutter.prevButton.Hide();
			if(nextindex === this.dat.length - 1) L.LBX.shutter.nextButton.Hide();
			L.LBX.viewer.Hide(function(){
				L.LBX.viewer.Clear(function(){
					L.LBX.viewer.opacity = 0;
					L.LBX.viewer.Load(L.dat[nextindex].src,L.dat[nextindex].dat,function(){
						L.current = nextindex;
						if(L.misc.load.callback) L.misc.Load.callback();
						L.LBX.viewer.Show(function(){
							if(L.misc.viewer.callback) L.misc.viewer.callback();
						});
						if(L.dat.length > 1){
							if(nextindex > 0) L.LBX.shutter.prevButton.Show();
							else L.LBX.shutter.prevButton.MoveTo({x:-5000,y:-5000,w:0,h:0});
							if(nextindex < L.dat.length - 1) L.LBX.shutter.nextButton.Show();
							else L.LBX.shutter.nextButton.MoveTo({x:-5000,y:-5000,w:0,h:0});
						}
					});
				});
			});
		}
	};
	
	COM.prototype.LBXDefault = function(){
		
		
		common._highestdepth = common._highestdepth.refresh();
		
		var template = common.marge({
			closeButton : {
				label : "close",
				position : "top right outset",
				style : {
					backgroundColor : "#ffffff",
					color : "#000000",
					fontSize : "12px",
					lineHeight : "1.3",
					fontFamily : "meiryo,Hiragino Kaku Gothic Pro,Arial",
					padding : "2px 5px"
				}
			},
			prevButton : {
				label : "prev",
				position : "center left outset",
				style : {
					backgroundColor : "#ffffff",
					color : "#000000",
					fontSize : "12px",
					lineHeight : "1.3",
					fontFamily : "meiryo,Hiragino Kaku Gothic Pro,Arial",
					padding : "2px 5px"
				}
			},
			nextButton : {
				label : "next",
				position : "center right outset",
				style : {
					backgroundColor : "#ffffff",
					color : "#000000",
					fontSize : "12px",
					lineHeight : "1.3",
					fontFamily : "meiryo,Hiragino Kaku Gothic Pro,Arial",
					padding : "2px 5px"
				}
			},
			shutter : {
				style : {
					backgroundColor : "#ffffff"
				},
				offset : {
					top : 30
				}
			},
			loading : {
				label : "Now Loading ...",
				style : {
					backgroundColor : "#ffffff",
					color : "#000000",
					fontSize : "12px",
					lineHeight : "1.3",
					fontFamily : "meiryo,Hiragino Kaku Gothic Pro,Arial",
					padding : "2px 5px"
				}
			}
		},((arguments.length > 0 && typeof arguments[0] == "object") ? arguments[0] : {}),true);
		
		/*var myLBX = new common.LBX(template);*/
		
		
		function GetSrc(item){
			var ret = { src : null, dat : {} },
				size_pattern = /LBXSize:([\d]+),([\d]+)/;
			if(size_pattern.test(item.className)){
				ret.dat.width = item.className.match(size_pattern)[1];
				ret.dat.height = item.className.match(size_pattern)[2];
			}
			if(item.src && /.*?_S(?:_f[12])?\.(?:gif|jpg|png)$/.test(item.src)) ret.src = item.src.replace("_S","_L");
			else if(item.href) ret.src = item.href;
			return ret;
		}
		
		var group = new common.Array();
		common.E(".LBX").each(function(index,item){
			if(/LBXGroup:([\d]+)/.test(item.className)){
				var gid = item.className.match(/LBXGroup:([\d]+)/)[1];
				if(group[gid]) group[gid].push(item);
				else group[gid] = new common.Array(item);
			}
			else{
				var tmp = GetSrc(item);
				if(tmp.src) item.addEventListener("click",function(item,evt){
					myLBX.Simple(tmp.src,tmp.dat);
					if(evt.preventDefault) evt.preventDefault();
					else event.returnValue = false;
				});
			}
		});
		
		group.each(function(index,arr){
			if(!arr) return;
			
			var dat = [];
			arr.each(function(item_index,item){
				var tmp = GetSrc(item);
				if(tmp.src){
					dat.push({
						"index" : dat.length,
						src : tmp.src,
						dat : tmp.dat,
						keyObject : item
					});
				}
			});
			
			var myLBXSet = new common.LBXSet(dat,template);
		});
		
	};
	/*this._startup_items.push(function(){ common.LBXDefault(); });*/
	
	
	
	/* -------------------- SWFObject -------------------- */
	/*! SWFObject v2.2 <http://code.google.com/p/swfobject/> 
	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
	*/
	COM.prototype.swfobject = function() {
		var UNDEF = "undefined", OBJECT = "object", SHOCKWAVE_FLASH = "Shockwave Flash", SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash", FLASH_MIME_TYPE = "application/x-shockwave-flash", EXPRESS_INSTALL_ID = "SWFObjectExprInst", ON_READY_STATE_CHANGE = "onreadystatechange", win = window, doc = document, nav = navigator, plugin = false, domLoadFnArr = [main], regObjArr = [], objIdArr = [], listenersArr = [], storedAltContent, storedAltContentId, storedCallbackFn, storedCallbackObj, isDomLoaded = false, isExpressInstallActive = false, dynamicStylesheet, dynamicStylesheetMedia, autoHideShow = true,
		ua = function() { var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF, u = nav.userAgent.toLowerCase(), p = nav.platform.toLowerCase(), windows = p ? /win/.test(p) : /win/.test(u), mac = p ? /mac/.test(p) : /mac/.test(u), webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, ie = !+"\v1", playerVersion = [0,0,0], d = null; if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) { d = nav.plugins[SHOCKWAVE_FLASH].description; if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { plugin = true; ie = false; d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10); playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10); playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0; } } else if (typeof win.ActiveXObject != UNDEF) { try { var a = new ActiveXObject(SHOCKWAVE_FLASH_AX); if (a) { d = a.GetVariable("$version"); if (d) { ie = true; d = d.split(" ")[1].split(","); playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; } } } catch(e) {} } return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac }; }(),
		onDomLoad = function() { if (!ua.w3) { return; } if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { callDomLoadFunctions(); } if (!isDomLoaded) { if (typeof doc.addEventListener != UNDEF) { doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false); }		 if (ua.ie && ua.win) { doc.attachEvent(ON_READY_STATE_CHANGE, function() { if (doc.readyState == "complete") { doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee); callDomLoadFunctions(); } }); if (win == top) { (function(){ if (isDomLoaded) { return; } try { doc.documentElement.doScroll("left"); } catch(e) { setTimeout(arguments.callee, 0); return; } callDomLoadFunctions(); })(); } } if (ua.wk) { (function(){ if (isDomLoaded) { return; } if (!/loaded|complete/.test(doc.readyState)) { setTimeout(arguments.callee, 0); return; } callDomLoadFunctions(); })(); } addLoadEvent(callDomLoadFunctions); } }();
		function callDomLoadFunctions() { if (isDomLoaded) { return; } try { var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span")); t.parentNode.removeChild(t); } catch (e) { return; } isDomLoaded = true; var dl = domLoadFnArr.length; for (var i = 0; i < dl; i++) { domLoadFnArr[i](); } }
		function addDomLoadEvent(fn) { if (isDomLoaded) { fn(); } else {  domLoadFnArr[domLoadFnArr.length] = fn; } }
		function addLoadEvent(fn) { if (typeof win.addEventListener != UNDEF) { win.addEventListener("load", fn, false); } else if (typeof doc.addEventListener != UNDEF) { doc.addEventListener("load", fn, false); } else if (typeof win.attachEvent != UNDEF) { addListener(win, "onload", fn); } else if (typeof win.onload == "function") { var fnOld = win.onload; win.onload = function() { fnOld(); fn(); }; } else { win.onload = fn; } }
		function main() {  if (plugin) { testPlayerVersion(); } else { matchVersions(); } }
		function testPlayerVersion() { var b = doc.getElementsByTagName("body")[0]; var o = createElement(OBJECT); o.setAttribute("type", FLASH_MIME_TYPE); var t = b.appendChild(o); if (t) { var counter = 0; (function(){ if (typeof t.GetVariable != UNDEF) { var d = t.GetVariable("$version"); if (d) { d = d.split(" ")[1].split(","); ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; } } else if (counter < 10) { counter++; setTimeout(arguments.callee, 10); return; } b.removeChild(o); t = null; matchVersions(); })(); } else { matchVersions(); } }
		function matchVersions() { var rl = regObjArr.length; if (rl > 0) { for (var i = 0; i < rl; i++) { var id = regObjArr[i].id; var cb = regObjArr[i].callbackFn; var cbObj = {success:false, id:id}; if (ua.pv[0] > 0) { var obj = getElementById(id); if (obj) { if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { setVisibility(id, true); if (cb) { cbObj.success = true; cbObj.ref = getObjectById(id); cb(cbObj); } } else if (regObjArr[i].expressInstall && canExpressInstall()) { var att = {}; att.data = regObjArr[i].expressInstall; att.width = obj.getAttribute("width") || "0"; att.height = obj.getAttribute("height") || "0"; if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); } if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); } var par = {}; var p = obj.getElementsByTagName("param"); var pl = p.length; for (var j = 0; j < pl; j++) { if (p[j].getAttribute("name").toLowerCase() != "movie") { par[p[j].getAttribute("name")] = p[j].getAttribute("value"); } } showExpressInstall(att, par, id, cb); } else { displayAltContent(obj); if (cb) { cb(cbObj); } } } } else { setVisibility(id, true); if (cb) { var o = getObjectById(id); if (o && typeof o.SetVariable != UNDEF) {  cbObj.success = true; cbObj.ref = o; } cb(cbObj); } } } } }
		function getObjectById(objectIdStr) { var r = null; var o = getElementById(objectIdStr); if (o && o.nodeName == "OBJECT") { if (typeof o.SetVariable != UNDEF) { r = o; } else { var n = o.getElementsByTagName(OBJECT)[0]; if (n) { r = n; } } } return r; }
		function canExpressInstall() { return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312); }
		function showExpressInstall(att, par, replaceElemIdStr, callbackFn) { isExpressInstallActive = true; storedCallbackFn = callbackFn || null; storedCallbackObj = {success:false, id:replaceElemIdStr}; var obj = getElementById(replaceElemIdStr); if (obj) { if (obj.nodeName == "OBJECT") { storedAltContent = abstractAltContent(obj); storedAltContentId = null; } else { storedAltContent = obj; storedAltContentId = replaceElemIdStr; } att.id = EXPRESS_INSTALL_ID; if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; } if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; } doc.title = doc.title.slice(0, 47) + " - Flash Player Installation"; var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn", fv = "MMredirectURL=" + win.location.toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title; if (typeof par.flashvars != UNDEF) { par.flashvars += "&" + fv; } else { par.flashvars = fv; } if (ua.ie && ua.win && obj.readyState != 4) { var newObj = createElement("div"); replaceElemIdStr += "SWFObjectNew"; newObj.setAttribute("id", replaceElemIdStr); obj.parentNode.insertBefore(newObj, obj); obj.style.display = "none"; (function(){ if (obj.readyState == 4) { obj.parentNode.removeChild(obj); } else { setTimeout(arguments.callee, 10); } })(); } createSWF(att, par, replaceElemIdStr); } }
		function displayAltContent(obj) { if (ua.ie && ua.win && obj.readyState != 4) { var el = createElement("div"); obj.parentNode.insertBefore(el, obj); el.parentNode.replaceChild(abstractAltContent(obj), el); obj.style.display = "none"; (function(){ if (obj.readyState == 4) { obj.parentNode.removeChild(obj); } else { setTimeout(arguments.callee, 10); } })(); } else { obj.parentNode.replaceChild(abstractAltContent(obj), obj); } } 
		function abstractAltContent(obj) { var ac = createElement("div"); if (ua.win && ua.ie) { ac.innerHTML = obj.innerHTML; } else { var nestedObj = obj.getElementsByTagName(OBJECT)[0]; if (nestedObj) { var c = nestedObj.childNodes; if (c) { var cl = c.length; for (var i = 0; i < cl; i++) { if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) { ac.appendChild(c[i].cloneNode(true)); } } } } } return ac; }
		function createSWF(attObj, parObj, id) { var r, el = getElementById(id); if (ua.wk && ua.wk < 312) { return r; } if (el) { if (typeof attObj.id == UNDEF) { attObj.id = id; } if (ua.ie && ua.win) { var att = ""; for (var i in attObj) { if (attObj[i] != Object.prototype[i]) { if (i.toLowerCase() == "data") { parObj.movie = attObj[i]; } else if (i.toLowerCase() == "styleclass") { att += ' class="' + attObj[i] + '"'; } else if (i.toLowerCase() != "classid") { att += ' ' + i + '="' + attObj[i] + '"'; } } } var par = ""; for (var j in parObj) { if (parObj[j] != Object.prototype[j]) { par += '<param name="' + j + '" value="' + parObj[j] + '" />'; } } el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>'; objIdArr[objIdArr.length] = attObj.id; r = getElementById(attObj.id);	 } else { var o = createElement(OBJECT); o.setAttribute("type", FLASH_MIME_TYPE); for (var m in attObj) { if (attObj[m] != Object.prototype[m]) { if (m.toLowerCase() == "styleclass") { o.setAttribute("class", attObj[m]); } else if (m.toLowerCase() != "classid") { o.setAttribute(m, attObj[m]); } } } for (var n in parObj) { if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { createObjParam(o, n, parObj[n]); } } el.parentNode.replaceChild(o, el); r = o; } } return r; }
		function createObjParam(el, pName, pValue) { var p = createElement("param"); p.setAttribute("name", pName);	 p.setAttribute("value", pValue); el.appendChild(p); }
		function removeSWF(id) { var obj = getElementById(id); if (obj && obj.nodeName == "OBJECT") { if (ua.ie && ua.win) { obj.style.display = "none"; (function(){ if (obj.readyState == 4) { removeObjectInIE(id); } else { setTimeout(arguments.callee, 10); } })(); } else { obj.parentNode.removeChild(obj); } } }
		function removeObjectInIE(id) { var obj = getElementById(id); if (obj) { for (var i in obj) { if (typeof obj[i] == "function") { obj[i] = null; } } obj.parentNode.removeChild(obj); } }
		function getElementById(id) { var el = null; try { el = doc.getElementById(id); } catch (e) {} return el; }
		function createElement(el) { return doc.createElement(el); }
		function addListener(target, eventType, fn) { target.attachEvent(eventType, fn); listenersArr[listenersArr.length] = [target, eventType, fn]; }
		function hasPlayerVersion(rv) { var pv = ua.pv, v = rv.split("."); v[0] = parseInt(v[0], 10); v[1] = parseInt(v[1], 10) || 0; v[2] = parseInt(v[2], 10) || 0; return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false; }
		function createCSS(sel, decl, media, newStyle) { if (ua.ie && ua.mac) { return; } var h = doc.getElementsByTagName("head")[0]; if (!h) { return; } var m = (media && typeof media == "string") ? media : "screen"; if (newStyle) { dynamicStylesheet = null; dynamicStylesheetMedia = null; } if (!dynamicStylesheet || dynamicStylesheetMedia != m) {  var s = createElement("style"); s.setAttribute("type", "text/css"); s.setAttribute("media", m); dynamicStylesheet = h.appendChild(s); if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) { dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1]; } dynamicStylesheetMedia = m; } if (ua.ie && ua.win) { if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) { dynamicStylesheet.addRule(sel, decl); } } else { if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) { dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}")); } } }
		function setVisibility(id, isVisible) { if (!autoHideShow) { return; } var v = isVisible ? "visible" : "hidden"; if (isDomLoaded && getElementById(id)) { getElementById(id).style.visibility = v; } else { createCSS("#" + id, "visibility:" + v); } }
		function urlEncodeIfNecessary(s) { var regex = /[\\\"<>\.;]/; var hasBadChars = regex.exec(s) != null; return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s; }
		var cleanup = function() { if (ua.ie && ua.win) { window.attachEvent("onunload", function() { var ll = listenersArr.length; for (var i = 0; i < ll; i++) { listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]); } var il = objIdArr.length; for (var j = 0; j < il; j++) { removeSWF(objIdArr[j]); } for (var k in ua) { ua[k] = null; } ua = null; for (var l in common.swfobject) { common.swfobject[l] = null; } common.swfobject = null; }); } }();
		return {
			registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) { if (ua.w3 && objectIdStr && swfVersionStr) { var regObj = {}; regObj.id = objectIdStr; regObj.swfVersion = swfVersionStr; regObj.expressInstall = xiSwfUrlStr; regObj.callbackFn = callbackFn; regObjArr[regObjArr.length] = regObj; setVisibility(objectIdStr, false); } else if (callbackFn) { callbackFn({success:false, id:objectIdStr}); } },
			getObjectById: function(objectIdStr) { if (ua.w3) { return getObjectById(objectIdStr); } },
			embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) { var callbackObj = {success:false, id:replaceElemIdStr}; if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) { setVisibility(replaceElemIdStr, false); addDomLoadEvent(function() { widthStr += ""; heightStr += ""; var att = {}; if (attObj && typeof attObj === OBJECT) { for (var i in attObj) { att[i] = attObj[i]; } } att.data = swfUrlStr; att.width = widthStr; att.height = heightStr; var par = {};  if (parObj && typeof parObj === OBJECT) { for (var j in parObj) { par[j] = parObj[j]; } } if (flashvarsObj && typeof flashvarsObj === OBJECT) { for (var k in flashvarsObj) { if (typeof par.flashvars != UNDEF) { par.flashvars += "&" + k + "=" + flashvarsObj[k]; } else { par.flashvars = k + "=" + flashvarsObj[k]; } } } if (hasPlayerVersion(swfVersionStr)) { var obj = createSWF(att, par, replaceElemIdStr); if (att.id == replaceElemIdStr) { setVisibility(replaceElemIdStr, true); } callbackObj.success = true; callbackObj.ref = obj; } else if (xiSwfUrlStr && canExpressInstall()) { att.data = xiSwfUrlStr; showExpressInstall(att, par, replaceElemIdStr, callbackFn); return; } else { setVisibility(replaceElemIdStr, true); } if (callbackFn) { callbackFn(callbackObj); } }); } else if (callbackFn) { callbackFn(callbackObj);	} },
			switchOffAutoHideShow: function() { autoHideShow = false; },
			ua: ua,
			getFlashPlayerVersion: function() { return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] }; },
			hasFlashPlayerVersion: hasPlayerVersion,
			createSWF: function(attObj, parObj, replaceElemIdStr) { if (ua.w3) { return createSWF(attObj, parObj, replaceElemIdStr); } else { return undefined; } },
			showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) { if (ua.w3 && canExpressInstall()) { showExpressInstall(att, par, replaceElemIdStr, callbackFn); } },
			removeSWF: function(objElemIdStr) { if (ua.w3) { removeSWF(objElemIdStr); } },
			createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) { if (ua.w3) { createCSS(selStr, declStr, mediaStr, newStyleBoolean); } },
			addDomLoadEvent: addDomLoadEvent,
			addLoadEvent: addLoadEvent,
			getQueryParamValue: function(param) { var q = doc.location.search || doc.location.hash; if (q) { if (/\?/.test(q)) { q = q.split("?")[1]; } if (param == null) { return urlEncodeIfNecessary(q); } var pairs = q.split("&"); for (var i = 0; i < pairs.length; i++) { if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) { return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1))); } } } return ""; },
			expressInstallCallback: function() { if (isExpressInstallActive) { var obj = getElementById(EXPRESS_INSTALL_ID); if (obj && storedAltContent) { obj.parentNode.replaceChild(storedAltContent, obj); if (storedAltContentId) { setVisibility(storedAltContentId, true); if (ua.ie && ua.win) { storedAltContent.style.display = "block"; } } if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); } } isExpressInstallActive = false; }  }
		};
	}();
	
	
	
	
	COM.prototype.Dom = {
		complete : function(){
			if(common._DOM === true) return;
			common._DOM = true;
			common.Dom.onload();
		},
		check : function(){
			if(document.addEventListener){
				document.addEventListener("DOMContentLoaded", common.Dom.complete, false);
			}
			else if(navigator.userAgent.toUpperCase().indexOf("MSIE") != -1 && window == top){
				(function(){
					try{
						document.documentElement.doScroll("left");
					}
					catch(e){
						setTimeout(arguments.callee,50);
						return;
					}
					common.Dom.complete();
				})();
				document.onreadystatechange = function(){
					if(document.readyState == "complete"){
						document.onreadystatechange = null;
						common.Dom.complete();
					}
				}
			}
			else if(navigator.userAgent.match(/webkit|safari|khtml/i)){
				var timerID = setInterval(function(){
					if(document.readyState.match(/loaded|complete/)){
						common.Dom.complete();
						clearInterval(timerID);
					}
				},10);
			}
			else{
				window.onload = function(){
					common.Dom.complete();
					if(typeof common.__WindowOnload == "function") __WindowOnload();
				}
			}
		},
		onload : function(){
			common._startup_items.each(function(index,func){ func(); });
		}
	};
	this.Dom.check();
	window.onresize = function(){ common._onresize_items.each(function(index,func){ func(); }); if(typeof __WindowOnresize == "function") __WindowOnresize() };
	window.onscroll = function(){ common._onscroll_items.each(function(index,func){ func(); }); if(typeof __WindowOnscroll == "function") __WindowOnscroll() };
	
}


var com = new COM();
















/*
common script lib. Ver.5.0.9
2009.09.16.
*/
