function COM(){
	
	var common = this;
	
	/* ---------- global variables ----------
	_SARI_safemode:
	1 : searching for nodes with "_SARI_className" from the nodes that have tag name in "_SARI_safemode_array"
	0 : searching for it from all of the nodes. but it's so expensive
	you'd better choose "1", unless some special reasons can be found.
	*/
	
	this.__WindowOnload        = window.onload;
	this.__WindowOnresize      = window.onresize;
	this.__WindowOnscroll      = window.onscroll;
	this._SARI_safemode        = 1;
	this._SARI_safemode_array  = ["img","input"];
	this._SARI_className       = "SARI";
	this._mailto_className     = "mailto";
	this._lightbox_className   = "LB";
	this._debugger             = {};
	this._debugger.write       = function(){};
	this._debug_mode           = false;
	this._debug_position       = "bottom right";
	this._debug_size           = [500,300];
	this._startup_items        = [];
	this._onresize_items       = [];
	this._onscroll_items       = [];
	
	/* ---------- functions ---------- */
	
	COM.prototype.delegate = function(base,current,methodname){
		current[methodname] = function(){ return base[methodname].apply(this,arguments); };
	}
	
	COM.prototype.browsercheck = function(){
		
		function getUserAgent(){
			return navigator.userAgent;
		}
		
		function compareVersion(ver1,ver2){
			
			var ret = true;
			var v1 = ver1.split(".");
			var v2 = ver2.split(".");
			var L = Math.min(v1.length,v2.length);
			
			for(var i=0 ; i<L ; i++){
				if(ret != true) break;
				
				if(v1[i] > v2[i]){
					ret = ver1;
				}
				else if(v1[i] < v2[i]){
					ret = ver2;
				}
			}
			
			if(i == L){
				if(v1.length > v2.length){
					ret = ver1;
				}
				else if(v1.length < v2.length){
					ret = ver2;
				}
			}
			
			return ret;
		}
		
		function client(){
			
			var str = null;
			var UA = getUserAgent();
			
			// MSIE
			if(UA.toUpperCase().indexOf("MSIE") != -1){
				str = "MSIE";
			}
			// safari
			else if(UA.toUpperCase().indexOf("SAFARI") != -1){
				str = "Safari";
			}
			// fx
			else if(UA.toUpperCase().indexOf("FIREFOX") != -1){
				str = "Firefox";
			}
			// netscape
			else if(
				UA.toUpperCase().indexOf("NETSCAPE") != -1 || 
				(
					UA.toUpperCase().indexOf("MOZILLA/4") != -1 && 
					UA.toUpperCase().indexOf("MSIE") == -1
				)
			){
				str = "Netscape";
			}
			// opera
			else if(UA.toUpperCase().indexOf("OPERA") != -1){
				str = "Opera";
			}
			
			return str;
		}
		
		function platform(){
			
			var str = {
				major : null,
				minor : null
			};
			var UA = getUserAgent();
			
			// windows
			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";
				}
				
			}
			// mac os
			else if(UA.toUpperCase().indexOf("MAC") != -1){
				var pattern = new RegExp("MSIE ([0-9\.]+)");
				var 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
			}
			var Cl = client();
			var Pl = platform().major;
			var UA = getUserAgent();
			
			// MSIE
			if(Cl == "MSIE"){
				var pattern = new RegExp("MSIE ([0-9\.]+)");
				var match = UA.match(pattern);
				if(match != null){
					str["major"] = match[1].charAt(0);
					str["minor"] = match[1];
				}
			}
			// safari
			if(Cl == "Safari"){
				var pattern = new RegExp("Safari/([0-9\.]+)");
				var match = UA.match(pattern);
				if(match != null){
					var v = match[1] - 0;
					if(compareVersion(v.toString(),"312.6") == true || compareVersion(v.toString(),"312.6") == "312.6"){
						str["major"] = 1;
					}
					else if(
						(compareVersion(v.toString(),"412") == v) && 
						(compareVersion(v.toString(),"419.3") == true || compareVersion(v.toString(),"419.3") == "419.3")
					){
						str["major"] = 2;
					}
					else if(compareVersion(v.toString(),"522") == v){
						str["major"] = 3;
					}
					str["minor"] = match[1];
				}
			}
			// fx
			if(Cl == "Firefox"){
				var pattern = new RegExp("Firefox/([0-9\.]+)");
				var match = UA.match(pattern);
				if(match != null){
					str["major"] = match[1].charAt(0);
					str["minor"] = match[1];
				}
			}
			// netscape
			if(Cl == "Netscape"){
				var pattern = new RegExp("Netscape/([0-9\.]+)");
				var 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\.]+)");
					var match = UA.match(pattern);
						if(match != null){
							str["major"] = match[1].charAt(0);
							str["minor"] = match[1];
						}
				}
			}
			// opera
			if(Cl == "Opera"){
				var pattern = new RegExp("Opera/([0-9\.]+)");
				var 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.getCurrentScript = function(){
		var ret = null;
		try{
			(function(obj){
				if(obj.nodeName.toLowerCase() == "script"){
					ret = obj;
				}
				else{
					arguments.callee(obj.lastChild);
				}
			})(document);
		}catch(e){
			var tmp = document.getElementsByTagName("script");
			for(var i=0 ; i<tmp.length ; i++){
				if(tmp[i].src.indexOf("com.js") != -1){
					ret = tmp[i];
					break;
				}
			}
		}
		return ret;
	}
	
	COM.prototype.getScreenInfo = function(){
		
		function info(){
			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(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 (window.innerHeight && window.scrollMaxY) {	
				this.screen_width  = document.body.scrollWidth;
				this.screen_height = window.innerHeight + window.scrollMaxY;
			}
			else if (document.body.scrollHeight > document.body.offsetHeight){
				this.screen_width  = document.body.scrollWidth;
				this.screen_height = document.body.scrollHeight;
			}
			else {
				this.screen_width  = document.body.offsetWidth;
				this.screen_height = document.body.offsetHeight;
			}
		}
		
		return new info();
	}
	
	COM.prototype.isArray = function(array){
	return !(
			!array || 
			(!array.length || array.length == 0) || 
			typeof array !== 'object' || 
			!array.constructor || 
			array.nodeType || 
			array.item 
		);
	}
	
	COM.prototype.empty = function(obj){
		var ret = true;
		var 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 ; i<obj.childNodes.length ; i++){
					if(obj.childNodes[i].nodeType == 1){
						ret = false;
						break;
					}
				}
			}
		}
		
		return ret;
	}
	
	COM.prototype.DeBug = function(){
		
		function DeBugWindow(obj){
			
			var D = this;
			
			this.obj = obj;
			this.w = 0;
			this.h = 0;
			this.x = 0;
			this.y = 0;
			
			var screenInfo = common.getScreenInfo();
			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";
				if(common._browser.nav == "MSIE"){
					this.obj.style.posRight    = this.x;
					this.obj.style.posTop      = this.y;
					this.obj.style.pixelWidth  = this.w;
					this.obj.style.pixelHeight = this.h;
					this.obj.style.filter = "alpha(opacity=70)";
				}
				else{
					this.obj.style.right  = this.x + "px";
					this.obj.style.top    = this.y + "px";
					this.obj.style.width  = this.w + "px";
					this.obj.style.height = this.h + "px";
					this.obj.style.opacity = 0.7;
				}
			},
			
			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.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;
		var w = window.screen.width;
		var h = window.screen.height;
		var l = (w-wid)/2;
		var t = ((h-hei)/2)-offset;
		sty = prop;
		sty+= ",width=";
		sty+= wid;
		sty+= ",height=";
		sty+= hei;
		sty+= ",left=";
		sty+= l;
		sty+= ",top=";
		sty+= 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.getElementsByTagAndClassName = function(tag_name,class_name){
		/*
		this is not a method but a function.
		This returns it as Array, when the corresponding elements are discovered.
		This returns false, when the corresponding tag name or class name is not able to be discovered.
		when you do not want to limit the kind of tag, you can use "*" for the 1st argument but it's so expensive.
		*/
		var return_array = [];
		if(!document.getElementsByTagName(tag_name)) return false;
		
		var tmp = document.getElementsByTagName(tag_name);
		for(var i=0 ; i<tmp.length ; i++){
			var class_array = tmp[i].className.split(" ");
			for(var c=0 ; c<class_array.length ; c++){
				if(class_array[c] == class_name){
					return_array[return_array.length] = tmp[i];
				}
			}
		}
		if(return_array.length < 1) return false;
		return return_array;
	}
	
	COM.prototype.getBeforeElement = function(obj){
		/*
		this returns the before "element" of the node passed as an argument. 
		*/
		var return_obj = null;
		
		var p = obj.parentNode;
		var e = [];
		for(var i=0 ; i<p.childNodes.length ; i++){
			if(p.childNodes[i].nodeType != 1) continue;
			e.push(p.childNodes[i]);
			
			if(p.childNodes[i] == obj){
				if(e.length < 2){
					return null;
				}
				else{
					return e[e.length - 2];
				}
			}
			
		}
		
		
	}
	
	COM.prototype.getNextElement = function(obj){
		/*
		this returns the next "element" of the node passed as an argument. 
		*/
		var return_obj = null;
		
		(function (obj){
			if(!obj.nextSibling){
				// do nothing
			}
			else{
				if(obj.nextSibling.nodeType == 1){
					return_obj = obj.nextSibling;
				}
				else{
					arguments.callee(obj.nextSibling);
				}
			}
		})(obj);
		
		return return_obj;
	}
	
	COM.prototype.getUrlInfo = function(){
		
		function info(url){ // class
			
			var sect = [];
			var tmp1 = url.split("#");
			var tmp2 = tmp1[0].split("?");
			
			sect[0] = tmp2[0]; // main
			sect[1] = tmp2[1]; // query
			sect[2] = tmp1[1]; // hash
			
			var slashed = sect[0].split("/");
			
			// scheme
			var scheme_patern = /([a-z]+):/;
			this.scheme = (url.match(scheme_patern)) ? url.match(scheme_patern)[1] : null;
			
			// host
			this.host = (slashed[2].indexOf("@") != -1) ? slashed[2].split("@")[1] : slashed[2] ;
			
			// userName
			this.userName = (slashed[2].indexOf("@") != -1) ? slashed[2].split("@")[0].split(":")[0] : null;
			
			// passphrase
			this.passphrase = (slashed[2].indexOf("@") != -1) ? slashed[2].split("@")[0].split(":")[1] : null;
			
			// directory
			var dir_str = "";
			var dir_arr = [];
			(function(){
				for(var i=3 ; i<slashed.length-1 ; i++){
					dir_str += "/" + slashed[i];
					dir_arr.push(slashed[i]);
				}
				dir_str += "/";
			})();
			this.directory = {
				string : dir_str,
				array : dir_arr,
				length : dir_arr.length
			};
			
			// file
			this.file = slashed[slashed.length - 1].split("#")[0].split("?")[0];
			if(this.file == "") this.file = null;
			
			// path
			this.path = (this.file) ? this.directory.string + this.file : this.directory.string ;
			
			// hash
			this.hash = (sect[2]) ? sect[2] : null ;
			
			// query
			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 ; i<q_tmp_1.length ; 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.clearChildNodes = function(obj){
		/*
		this makes the element passed as an argument empty.
		and this returns nothing.
		*/
		if(!obj) return;
		
		for(var i=obj.childNodes.length-1 ; i>=0 ; i--){
			obj.removeChild(obj.childNodes[i]);
		}
	}
	
	COM.prototype.setStyle = function(obj,style){
		
		for(var i in style){
			
			if(common._browser.nav == "MSIE"){
				if(i == "top"){
					obj.style.posTop = parseInt(style[i].replace("px",""));
				}
				else if(i == "bottom"){
					obj.style.posBottom = parseInt(style[i].replace("px",""));
				}
				else if(i == "left"){
					obj.style.posLeft = parseInt(style[i].replace("px",""));
				}
				else if(i == "right"){
					obj.style.posRight = parseInt(style[i].replace("px",""));
				}
				else if(i == "width"){
					obj.style.pixelWidth = parseInt(style[i].replace("px",""));
				}
				else if(i == "height"){
					obj.style.pixelHeight = parseInt(style[i].replace("px",""));
				}
				else if(i == "opacity"){
					if(obj.parentNode){
						obj.style.filter = obj.currentStyle.filter;
					}
					obj.style.filter += "\n" + "alpha(opacity=" + (style[i] * 100) + ")"
				}
				else{
					obj.style[i] = style[i];
				}
			}
			else{
				obj.style[i] = style[i];
			}
			
		}
		
	}
	
	COM.prototype.createXMLHttpRequest = function(){
		/*
		this returns new XMLHttpRequest Object.
		*/
		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.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){
						// do nothing
					}
				})(obj);
			}
			
			return ret;
		}
		
		ret.offset.left = getOffset(obj).left;
		ret.offset.top  = getOffset(obj).top;
		
		(function(obj){
			var f = arguments.callee;
			var 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;
					var 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){
		/*
		this returns the parameter as GET format string.
		*/
		var str = "";
		for(var i in param){
			str += (str == "") ? "" : "&" ;
			str += i + "=" + param[i];
		}
		
		return str;
	}
	
	COM.prototype.getFlashVersion = function(){
		try{
			fla=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").FlashVersion();
			fla=Math.floor(fla / 0x10000);
		}
		catch(e){
			try{
				
				fla=navigator.plugins["Shockwave Flash"].description.charAt(16);
			}
			catch(e){
				fla = 0;
			}
		}
		return fla.toString(10);
	}
	
	COM.prototype.fade = function(obj){
		
		function Fade(obj){ // class
			
			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 ;
				var callback = (arguments.length > 1) ? arguments[1] : false ;
				this.To(0,a,callback);
				
			},
			
			To : function(value){
				
				var F = this;
				
				var a = (arguments.length > 1) ? arguments[1] : 5 ;
				var callback = (arguments.length > 2 && typeof arguments[2] == "function") ? arguments[2] : false ;
				
				if(a > 1) a = 1 / a;
				clearInterval(this.timerID);
				this.p = this.alpha;
				var initial = this.alpha;
				this.timerID = setInterval(function(){
					
					F.p += (value - F.p) * a;
					F.p = Math.floor(F.p);
					F.setAlpha(F.p);
					
					if(
						(initial >= value && F.p <= value+1) || 
						(initial <  value && F.p >= value-1)
					){
						clearInterval(F.timerID);
						F.setAlpha(value);
						
						if(callback != false) callback();
					}
					
				},0.01 * 1000);
				
			}
		}
		
		return new Fade(obj);
	}
	
	COM.prototype.crawl = function(){
		
		function Crawler(){
			
			this.XHR = common.createXMLHttpRequest();
			this.responseText = null;
			this.responseXML = null;
			
		}
		Crawler.prototype = {
			
			Load : function(url){
				
				var L = this;
				var callback = (arguments.length > 1 && typeof arguments[1] == "function") ? arguments[1] : false ;
				
				this.XHR.open("GET",url,true);
				this.XHR.send(null);
				this.XHR.onreadystatechange = function(){
					if(L.XHR.readyState == 4 && L.XHR.responseText){
						L.responseText = L.XHR.responseText;
						L.responseXML = L.XHR.responseXML;
						if(callback) callback();
					}
				}
				
			}
			
		}
		
		return new Crawler();
	}
	
	COM.prototype.scroll = function(){
		
		function Scroll(){
			
			this.obj = (arguments.length > 0) ? arguments[0] : window ;
			this.timerID = null;
			
		}
		Scroll.prototype = {
			
			To : function(){
				
				var S = this;
				var screenInfo = common.getScreenInfo();
				
				var pX = screenInfo.scroll_left;
				var pY = screenInfo.scroll_top;
				
				var tX = (!arguments[0] || isNaN(arguments[0])) ? pX : arguments[0] ;
				if(tX > screenInfo.screen_width)  tX = screenInfo.screen_width;
				var tY = (!arguments[1] || isNaN(arguments[1])) ? pY : arguments[1] ;
				if(tY > screenInfo.screen_height) tY = screenInfo.screen_height;
				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 ;
				
				clearInterval(this.timerID);
				this.timerID = setInterval(function(){
					
					pX += (tX - pX) * a;
					pY += (tY - pY) * a;
					S.obj.scrollTo(pX,pY);
					
					if(Math.abs(tY - pY) < 1){
						clearInterval(S.timerID);
						S.obj.scrollTo(tX,tY);
						
						if(callback) callback();
					}
					
				},10);
				
			}
			
		}
		
		var obj = (arguments.length > 0) ? arguments[0] : window ;
		return new Scroll(obj);
		
	}
	
	COM.prototype.mailto2link = function (){
		/*
		the mail address written in html with A element may be collected by fuckin spamers.
		therefore, we should not write the mail address directly in html. 
		you'd better replace "@" with "&#64;" and use SPAN element with "_mailto_className" as class attribute.
		*/
		
		function Span(obj){
			
			var S = this;
			this.obj = obj;
			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){
					this.obj.onclick = function(){
						window.location.href = "mailto:" + S.address;
					}
				}
			}
		}
		
		var span = [];
		
		var tmp = common.getElementsByTagAndClassName("span",common._mailto_className);
		for(var i=0 ; i<tmp.length ; i++){
			span.push(new Span(tmp[i]));
		}
	}
	this._startup_items.push(this.mailto2link);
	
	COM.prototype.SARI = function(){
		/*
		when you want to use the rollover effect in html coding, you'd better set "_SARI_className" as the class attribute of the corresponding element.
		you have nothing to do to preload swap images :-)
		*/
		
		function SR(obj){
			
			var SR = this;
			
			this.obj = obj;
			this.f1 = document.createElement("img");
			this.f2 = document.createElement("img");
			
			var pattern = /_f[12]\./;
			
			this.f1.src = this.obj.src;
			this.f2.src = this.obj.src.replace(pattern,"_f2.");
			
			function setEvent(){
				if(SR.obj.className.indexOf(common._SARI_className) == -1) return;
				
				SR.obj.onmouseover = function(){
					this.src = SR.f2.src;
				}
				SR.obj.onmouseout = function(){
					this.src = SR.f1.src;
				}
			}
			
			if(common._browser.nav == "MSIE"){
				setEvent();
			}
			else{
				this.f2.onload = setEvent;
			}
			
		}
		
		// expensive mode
		if(common._SARI_safemode == 0){
			var tmp = common.getElementsByTagAndClassName("*",common._SARI_className);
		}
		// normal mode
		else{
			var tmp = [];
			for(var sm=0 ; sm<common._SARI_safemode_array.length ; sm++){
				var tmp_safe = common.getElementsByTagAndClassName(common._SARI_safemode_array[sm],common._SARI_className);
				if(tmp_safe != false) tmp = tmp.concat(tmp_safe);
			}
		}
		
		var SR_set = [];
		for(var i=0 ; i<tmp.length ; i++){
			SR_set[i] = new SR(tmp[i]);
		}
	}
	this._startup_items.push(this.SARI);
	
	COM.prototype.LBX = function(){
		/*
		this is under construction.
		*/
		var URL_close_button_f1        = "/_common/_img/_lig_foo_but_02_lod.gif";
		var URL_close_button_f2        = "/_common/_img/_lig_foo_but_02.gif";
		var URL_error_button           = "/_common/_img/_lig_foo_but_02_err.gif";
		var URL_prev_button            = "/_common/_img/_lig_but_pre.gif";
		var URL_next_button            = "/_common/_img/_lig_but_nex.gif";
		var INT_load_wait              = 0.8;
		
		
		function Main(images){
			
			var M = this;
			
			function Display(){
				
				this.stat = 0;
				
				this.curtain = document.createElement("div");
				this.stage   = document.createElement("div");
				this.image   = document.createElement("img");
				this.button  = document.createElement("p");
				this.button_img = document.createElement("img");
				
				this.curtain_fade = null;
				
				this.button_img_01 = document.createElement("img");
				this.button_img_01.src = URL_close_button_f1;
				this.button_img_02 = document.createElement("img");
				this.button_img_02.src = URL_close_button_f2;
				this.button_img_03 = document.createElement("img");
				this.button_img_03.src = URL_error_button;
				
				
			}
			Display.prototype = {
				
				Init : function(){
					
					var D = this;
					var si = common.getScreenInfo();
					
					common.setStyle(this.curtain,{
						position        : "absolute",
						left            : "0px",
						top             : "0px",
						width           : si.screen_width + "px",
						height          : si.screen_height + "px",
						backgroundColor : "#000000",
						opacity         : 0
					});
					
					common.setStyle(this.stage,{
						position        : "absolute",
						top             : (si.scroll_top + si.window_height * 0.1) + "px",
						left            : "0px",
						height          : "0px",
						overflow        : "hidden"
					});
					
					common.setStyle(this.button,{
						position        : "absolute",
						left            : "0px",
						top             : (si.scroll_top + si.window_height * 0.1 + 20) + "px",
						margin          : "0px",
						width           : si.window_width + "px",
						textAlign       : "center",
						cursor          : "default"
					});
					
					this.stage.appendChild(this.image);
					this.button.appendChild(this.button_img);
					this.button_img.src = this.button_img_01.src;
					this.button_img.onclick = this.curtain.onclick = function(){
						D.Hide();
					}
				},
				
				Show : function(){
					
					this.Init();
					document.body.appendChild(this.curtain);
					document.body.appendChild(this.stage);
					this.curtain_fade = common.fade(this.curtain);
					this.curtain_fade.setAlpha(70);
					this.stat = 1;
					
				},
				
				Hide : function(){
					
					this.stage.removeChild(this.image);
					this.button.removeChild(this.button_img);
					document.body.removeChild(this.button);
					this.Init();
					document.body.removeChild(this.stage);
					document.body.removeChild(this.curtain);
					this.stat = 0;
					
				},
				
				Load : function(){
					
					var S = this;
					var item = (arguments.length > 0) ? arguments[0] : M.item[current] ;
					var a = (arguments.length > 1) ? arguments[1] : 5 ; if(a > 1) a = 1 / a;
					var callback = (arguments.length > 2 && typeof arguments[2] == "function") ? arguments[2] : false ;
					var wait = (arguments.length > 3) ? arguments[3] : 0 ;
					var src = item.SImg.src.replace("_S","_L").untiCache();
					
					this.image.onload = function(){
						var si = common.getScreenInfo();
						common.setStyle(S.stage,{
							width : S.image.width + "px",
							left  : ((si.window_width - S.image.width) / 2) + "px"
						});
						var tH = S.image.height;
						var pH = S.stage.offsetHeight;
						var pT = S.stage.offsetTop;
						var p = pH / tH * 100;
						
						setTimeout(function(){
							S.button_img.src = S.button_img_02.src;
							common.setStyle(S.button_img,{
								cursor : "pointer"
							});
							var tmpTimerID = setInterval(function(){
								
								p += (100 - p) * a;
								common.setStyle(S.stage,{
									height : (tH * p / 100) + "px"
								});
								common.setStyle(S.button,{
									top : (pT + tH * p / 100 + 20) + "px"
								});
								if(p > 99){
									clearInterval(tmpTimerID);
									common.setStyle(S.stage,{
										height : tH + "px"
									});
									common.setStyle(S.button,{
										top : (pT + tH + 20) + "px"
									});
									if(callback) callback();
								}
							},5);
						},wait * 1000);
					}
					
					this.image.onerror = function(){
						S.button_img.src = S.button_img_03.src;
						common.setStyle(S.button_img,{
							cursor : "pointer"
						});
					}
					
					this.image.src = src;
					document.body.appendChild(this.button);
					
				}
				
			}
			
			function Item(simg){
				this.SImg = simg;
			}
			Item.prototype = {
				Init : function(){
					var I = this;
					common.setStyle(this.SImg,{
						cursor : "pointer"
					});
					this.SImg.onclick = function(){
						if(M.display.stat == 0) M.display.Show();
						M.display.Load(I,5,null,INT_load_wait);
					}
				}
			}
			
			this.current = 0;
			this.display = new Display();
			this.item = [];
			
			
			for(var i=0 ; i<images.length ; i++){
				var n = this.item.length;
				this.item[n] = new Item(images[i]);
				this.item[n].Init();
			}
		}
		
		
		
		
		
		var images = common.getElementsByTagAndClassName("img","LB");
		var myLightBox = new Main(images);
		
	}
	this._startup_items.push(this.LBX);
	
	COM.prototype.ieBackgroundPrint = function(){
		
		if(common._browser.nav != "MSIE") return;
		if(common._browser.ver.major != 6) return;
		
		var col = [];
		var tmp = [];
		
		if(common.getElementsByTagAndClassName("div","main-contents")) col[col.length] = common.getElementsByTagAndClassName("div","main-contents")[0].getElementsByTagName("*");
		
		for(var i=0 ; i<col.length ; i++){
			for(var j=0 ; j<col[i].length ; j++){
				tmp[tmp.length] = col[i][j];
			}
		}
		
		var count = 0;
		
		(function(){
			
			var obj = tmp[count];
			if(
				obj && 
				obj.currentStyle.backgroundImage && 
				obj.currentStyle.backgroundImage != "none" && 
				obj.currentStyle.backgroundRepeat != "repeat" && 
				obj.currentStyle.width == "auto"
			){
				
				var oW = obj.offsetWidth;
				var pL = obj.currentStyle.paddingLeft.replace("px","").toString(10);
				var pR = obj.currentStyle.paddingRight.replace("px","").toString(10);
				obj.style.pixelWidth = oW - pL - pR;
				
			}
			
			var f = arguments.callee;
			
			if(count < tmp.length){
				count++;
				f();
			}
			else{
				//common._debugger.write("finish");
			}
		})();
		
	}
	this._startup_items.push(this.ieBackgroundPrint);
	
	
	
	
	
	/* -------------------- SWFObject -------------------- */
	/*! SWFObject v2.1 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software 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",win = window,doc = document,nav = navigator,domLoadFnArr = [],regObjArr = [],objIdArr = [],listenersArr = [],script,timer = null,storedAltContent = null,storedAltContentId = null,isDomLoaded = false,isExpressInstallActive = false;
		var ua = function() {var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,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)) {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] = /r/.test(d) ? parseInt(d.replace(/^.*r(.*)$/, "$1"), 10) : 0;}}else if (typeof win.ActiveXObject != UNDEF) {var a = null, fp6Crash = false;try {a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".7");}catch(e) {try { a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".6");playerVersion = [6,0,21];a.AllowScriptAccess = "always";}catch(e) {if (playerVersion[0] == 6) {fp6Crash = true;}}if (!fp6Crash) {try {a = new ActiveXObject(SHOCKWAVE_FLASH_AX);}catch(e) {}}}if (!fp6Crash && a) {try {d = a.GetVariable("$version");if (d) {d = d.split(" ")[1].split(",");playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];}}catch(e) {}}};var u = nav.userAgent.toLowerCase(),p = nav.platform.toLowerCase(),webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false,ie = false,windows = p ? /win/.test(p) : /win/.test(u),mac = p ? /mac/.test(p) : /mac/.test(u);
			/*@cc_on
				ie = true;
				@if (@_win32)
					windows = true;
				@elif (@_mac)
					mac = true;
				@end
			@*/
			return { w3cdom:w3cdom, pv:playerVersion, webkit:webkit, ie:ie, win:windows, mac:mac };}();
		var onDomLoad = function() {if (!ua.w3cdom) {return;};addDomLoadEvent(main);if (ua.ie && ua.win) {try {doc.write("<scr" + "ipt id=__ie_ondomload defer=true src=//:></scr" + "ipt>");script = getElementById("__ie_ondomload");if (script) {addListener(script, "onreadystatechange", checkReadyState);};}catch(e){}};if (ua.webkit && typeof doc.readyState != UNDEF){timer = setInterval(function() { if (/loaded|complete/.test(doc.readyState)) { callDomLoadFunctions(); }}, 10);};if (typeof doc.addEventListener != UNDEF) {doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, null);};addLoadEvent(callDomLoadFunctions);}();
		function checkReadyState() {if (script.readyState == "complete") {script.parentNode.removeChild(script);callDomLoadFunctions();};};
		function callDomLoadFunctions() {if (isDomLoaded) {return;};if (ua.ie && ua.win) {var s = createElement("span");try {var t = doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t);}catch (e) {return;};};isDomLoaded = true;if (timer) {clearInterval(timer);timer = null;};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() {var rl = regObjArr.length;for (var i = 0; i < rl; i++) {var id = regObjArr[i].id;if (ua.pv[0] > 0) {var obj = getElementById(id);if (obj) {regObjArr[i].width = obj.getAttribute("width") ? obj.getAttribute("width") : "0";regObjArr[i].height = obj.getAttribute("height") ? obj.getAttribute("height") : "0";if (hasPlayerVersion(regObjArr[i].swfVersion)) {if (ua.webkit && ua.webkit < 312) {fixParams(obj);};setVisibility(id, true);}else if (regObjArr[i].expressInstall && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) {showExpressInstall(regObjArr[i]);}else {displayAltContent(obj);};};}else {setVisibility(id, true);};};};
		function fixParams(obj) {var nestedObj = obj.getElementsByTagName(OBJECT)[0];if (nestedObj) {var e = createElement("embed"), a = nestedObj.attributes;if (a) {var al = a.length;for (var i = 0; i < al; i++) {if (a[i].nodeName == "DATA") {e.setAttribute("src", a[i].nodeValue);}else {e.setAttribute(a[i].nodeName, a[i].nodeValue);};};};var c = nestedObj.childNodes;if (c) {var cl = c.length;for (var j = 0; j < cl; j++) {if (c[j].nodeType == 1 && c[j].nodeName == "PARAM") {e.setAttribute(c[j].getAttribute("name"), c[j].getAttribute("value"));};};};obj.parentNode.replaceChild(e, obj);};};
		function showExpressInstall(regObj) {isExpressInstallActive = true;var obj = getElementById(regObj.id);if (obj) {if (regObj.altContentId) {var ac = getElementById(regObj.altContentId);if (ac) {storedAltContent = ac;storedAltContentId = regObj.altContentId;};}else {storedAltContent = abstractAltContent(obj);};if (!(/%$/.test(regObj.width)) && parseInt(regObj.width, 10) < 310) {regObj.width = "310";};if (!(/%$/.test(regObj.height)) && parseInt(regObj.height, 10) < 137) {regObj.height = "137";};doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",dt = doc.title,fv = "MMredirectURL=" + win.location + "&MMplayerType=" + pt + "&MMdoctitle=" + dt,replaceId = regObj.id;if (ua.ie && ua.win && obj.readyState != 4) {var newObj = createElement("div");replaceId += "SWFObjectNew";newObj.setAttribute("id", replaceId);obj.parentNode.insertBefore(newObj, obj);obj.style.display = "none";var fn = function() {obj.parentNode.removeChild(obj);};addListener(win, "onload", fn);};createSWF({ data:regObj.expressInstall, id:EXPRESS_INSTALL_ID, width:regObj.width, height:regObj.height }, { flashvars:fv }, replaceId);};};
		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";var fn = function() {obj.parentNode.removeChild(obj);};addListener(win, "onload", fn);}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 (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 if (ua.webkit && ua.webkit < 312) {var e = createElement("embed");e.setAttribute("type", FLASH_MIME_TYPE);for (var k in attObj) {if (attObj[k] != Object.prototype[k]) {if (k.toLowerCase() == "data") {e.setAttribute("src", attObj[k]);}else if (k.toLowerCase() == "styleclass") {e.setAttribute("class", attObj[k]);}else if (k.toLowerCase() != "classid") {e.setAttribute(k, attObj[k]);};};};for (var l in parObj) {if (parObj[l] != Object.prototype[l]) {if (l.toLowerCase() != "movie") {e.setAttribute(l, parObj[l]);};};};el.parentNode.replaceChild(e, el);r = e;}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" || obj.nodeName == "EMBED")) {if (ua.ie && ua.win) {if (obj.readyState == 4) {removeObjectInIE(id);}else {win.attachEvent("onload", function() {removeObjectInIE(id);});};}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) {if (ua.ie && ua.mac) {return;};var h = doc.getElementsByTagName("head")[0], s = createElement("style");s.setAttribute("type", "text/css");s.setAttribute("media", "screen");if (!(ua.ie && ua.win) && typeof doc.createTextNode != UNDEF) {s.appendChild(doc.createTextNode(sel + " {" + decl + "}"));};h.appendChild(s);if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {var ls = doc.styleSheets[doc.styleSheets.length - 1];if (typeof ls.addRule == OBJECT) {ls.addRule(sel, decl);};};};
		function setVisibility(id, isVisible) {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 ? 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) {if (!ua.w3cdom || !objectIdStr || !swfVersionStr) {return;};var regObj = {};regObj.id = objectIdStr;regObj.swfVersion = swfVersionStr;regObj.expressInstall = xiSwfUrlStr ? xiSwfUrlStr : false;regObjArr[regObjArr.length] = regObj;setVisibility(objectIdStr, false);},
			getObjectById: function(objectIdStr) {var r = null;if (ua.w3cdom) {var o = getElementById(objectIdStr);if (o) {var n = o.getElementsByTagName(OBJECT)[0];if (!n || (n && typeof o.SetVariable != UNDEF)) {r = o;}else if (typeof n.SetVariable != UNDEF) {r = n;};};};return r;},
			embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj) {if (!ua.w3cdom || !swfUrlStr || !replaceElemIdStr || !widthStr || !heightStr || !swfVersionStr) {return;};widthStr += "";heightStr += "";if (hasPlayerVersion(swfVersionStr)) {setVisibility(replaceElemIdStr, false);var att = {};if (attObj && typeof attObj === OBJECT) {for (var i in attObj) {if (attObj[i] != Object.prototype[i]) {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) {if (parObj[j] != Object.prototype[j]) {par[j] = parObj[j];};};};if (flashvarsObj && typeof flashvarsObj === OBJECT) {for (var k in flashvarsObj) {if (flashvarsObj[k] != Object.prototype[k]) {if (typeof par.flashvars != UNDEF) {par.flashvars += "&" + k + "=" + flashvarsObj[k];}else {par.flashvars = k + "=" + flashvarsObj[k];};};};};addDomLoadEvent(function() {createSWF(att, par, replaceElemIdStr);if (att.id == replaceElemIdStr) {setVisibility(replaceElemIdStr, true);};});}else if (xiSwfUrlStr && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) {isExpressInstallActive = true;setVisibility(replaceElemIdStr, false);addDomLoadEvent(function() {var regObj = {};regObj.id = regObj.altContentId = replaceElemIdStr;regObj.width = widthStr;regObj.height = heightStr;regObj.expressInstall = xiSwfUrlStr;showExpressInstall(regObj);});};},
			getFlashPlayerVersion: function() {return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };},
			hasFlashPlayerVersion: hasPlayerVersion,
			createSWF: function(attObj, parObj, replaceElemIdStr) {if (ua.w3cdom) {return createSWF(attObj, parObj, replaceElemIdStr);}else {return undefined;}},
			removeSWF: function(objElemIdStr) {if (ua.w3cdom) {removeSWF(objElemIdStr);}},
			createCSS: function(sel, decl) {if (ua.w3cdom) {createCSS(sel, decl);}},
			addDomLoadEvent: addDomLoadEvent,
			addLoadEvent: addLoadEvent,
			getQueryParamValue: function(param) {var q = doc.location.search || doc.location.hash;if (param == null) {return urlEncodeIfNecessary(q);}if (q) {var pairs = q.substring(1).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 && storedAltContent) {var obj = getElementById(EXPRESS_INSTALL_ID);if (obj) {obj.parentNode.replaceChild(storedAltContent, obj);if (storedAltContentId) {setVisibility(storedAltContentId, true);if (ua.ie && ua.win) {storedAltContent.style.display = "block";};};storedAltContent = null;storedAltContentId = null;isExpressInstallActive = false;};};}
		};
	}();
	
	
	
	
	
	/* ---------- start up items ----------
	when the event "window.onload" is generated, items of "_startup_items" will be executed as a function one after another. 
	To execute some scripts when the event "onload" is generated, you should make it a function and push it into the "_startup_items".
	*/
	window.onload = function(){
		for(var i=0 ; i<common._startup_items.length ; i++) common._startup_items[i]();
		if(typeof common.__WindowOnload == "function") common.__WindowOnload();
	};
	window.onresize = function(){
		for(var i=0 ; i<common._onresize_items.length ; i++) common._onresize_items[i]();
		if(typeof common.__WindowOnresize == "function") common.__WindowOnresize();
	};
	window.onscroll = function(){
		for(var i=0 ; i<common._onscroll_items.length ; i++) common._onscroll_items[i]();
		if(typeof common.__WindowOnscroll == "function") common.__WindowOnscroll();
	};
	
}
var com = new COM();

String.prototype.addGetParameter = function(param){
	/*
	this adds the parameter as GET format string and returns it.
	*/
	return (this.indexOf("?") != -1) ? this + "&" + com.createGetString(param) : this + "?" + com.createGetString(param) ;
}

String.prototype.untiCache = function(){
	/*
	this adds the timestamp string and returns it.
	*/
	var tmp = new Date();
	var param = { untiCache : tmp.getTime() };
	
	return this.addGetParameter(param);
}

Array.prototype.shuffle = function(){
	var tmp = new Array();
	for(var i=0 ; i<this.length ; i++){
		tmp[i] = this[i];
	}
	var len = tmp.length;
	var ret = new Array();
	
	while(len){
		var c = Math.floor(Math.random() * len);
		ret[ret.length] = tmp[c];
		tmp.splice(c,1);
		len--;
	}
	
	return ret;
}





/* ---------- switch css ---------- */
if(com._browser.nav == "Firefox" && com._browser.plf.major == "MacOSX") document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/_common/_css/MacFx.css\" media=\"screen,print\">");
if(com._browser.nav == "Firefox" && com._browser.plf.major == "MacOSX") document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"_css/MacFx.css\" media=\"screen,print\">");
if(com._browser.nav == "MSIE") document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/_common/_css/WinIE.css\" media=\"screen,print\">");
if(com._browser.nav == "MSIE") document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"_css/WinIE.css\" media=\"screen,print\">");
if(com._browser.nav == "Safari") document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/_common/_css/safari.css\" media=\"screen,print\">");
if(com._browser.nav == "Safari") document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"_css/safari.css\" media=\"screen,print\">");
document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/_common/_css/print.css\" media=\"print\">");





/* ---------- pizzahut custom ---------- */


com._startup_items.push(function(){
	if(!document.getElementById("wrap")) return;
	
	function Wrap(obj){
		
		var W = this;
		this.obj = obj;
		this.pH = this.obj.offsetHeight;
		
		this.Init();
		com._onresize_items.push(function(){
			W.Init();
		});
	}
	Wrap.prototype = {
		Init : function(){
			var screenInfo = com.getScreenInfo();
			if(this.obj.offsetHeight < screenInfo.window_height || this.obj.offsetHeight > this.pH){
				com.setStyle(this.obj,{
					height : screenInfo.window_height + "px"
				});
			}
		}
	}
	
	var wrap = new Wrap(document.getElementById("wrap"));
});






com._startup_items.push(function(){
	if(!document.getElementById("bread-clumbs")) return;
	
	function BCNavi(ol){
		
		var BC = this;
		
		function Clumb(li){
			
			this.li = li;
			this.a = null;
			this.urlInfo = null;
			this.text = null;
			this.src = null;
			this.img = document.createElement("img");
			
		}
		Clumb.prototype = {
			
			Init : function(){
				
				if(this.li.getElementsByTagName("img") && this.li.getElementsByTagName("img").length > 0){
					this.src = this.li.getElementsByTagName("img")[0].src;
					this.text = this.li.getElementsByTagName("img")[0].alt;
					this.li.getElementsByTagName("img")[0].parentNode.removeChild(this.li.getElementsByTagName("img")[0]);
				}
				
				if(this.li.getElementsByTagName("a").length > 0) this.a = this.li.getElementsByTagName("a")[0];
				if(this.a){
					this.urlInfo = com.getUrlInfo(this.a.href);
					if(!this.text) this.text = this.a.innerHTML;
					this.li.removeChild(this.a);
					com.clearChildNodes(this.a);
				}
				else{
					this.urlInfo = BC.urlInfo;
					if(!this.text) this.text = this.li.innerHTML;
				}
				
				
				if(this.src && this.text){
					this.img.src = this.src;
					this.img.alt = this.text;
				}
				else{
					var path = this.urlInfo.directory.string.replace(/[\/_]/g,"");
					var file = (this.urlInfo.file) ? this.urlInfo.file.replace(".","") : "indexphp" ;
					this.src = "/_common/_img/bre_" + path + file + ((this.a) ? "_f2" : "_f1") + ".gif";
					this.img.src = this.src;
					this.img.alt = this.text;
				}
				
				if(this.a) this.a.appendChild(this.img);
				
			}
			
		}
		
		this.ol = ol;
		this.div = document.createElement("div");
		this.fade = null;
		
		this.img1 = document.createElement("img");
		this.img2 = document.createElement("img");
		this.clumb = [];
		this.sep = [];
		this.urlInfo = com.getUrlInfo();
		
		var tmp = this.ol.getElementsByTagName("li");
		for(var i=0 ; i<tmp.length ; i++){
			this.clumb[i] = new Clumb(tmp[i]);
			this.clumb[i].Init();
		}
		
		this.Init();
	}
	BCNavi.prototype = {
		
		Init : function(){
			
			this.img1.src = "/_common/_img/_bre_bg_01.gif";
			this.img2.src = "/_common/_img/_bre_bg_02.gif";
			
			this.div.appendChild(this.img1);
			for(var i=0 ; i<this.clumb.length ; i++){
				if(i > 0){
					this.sep[i] = document.createElement("img");
					this.sep[i].src = "/_common/_img/_bre_sep.gif";
					this.div.appendChild(this.sep[i]);
				}
				this.div.appendChild((this.clumb[i].a) ? this.clumb[i].a : this.clumb[i].img);
			}
			this.div.appendChild(this.img2);
			
			this.div.style.visibility = "hidden";
			this.ol.parentNode.appendChild(this.div);
			this.ol.parentNode.removeChild(this.ol);
			this.fade = com.fade(this.div);
			this.fade.setAlpha(0);
			
		},
		
		Show : function(){
			
			var ease = (arguments.length > 0) ? arguments[0] : 5 ;
			
			this.div.style.visibility = "visible";
			this.fade.In(ease);
			
		}
		
	}
	
	if(!document.getElementById("bread-clumbs").getElementsByTagName("ol")) return;
	if(document.getElementById("bread-clumbs").getElementsByTagName("ol").length < 1) return;
	var breadClumbsNavi = new BCNavi(document.getElementById("bread-clumbs").getElementsByTagName("ol")[0]);
	breadClumbsNavi.Show();
	
});






com._startup_items.push(function(){
	
	if(!document.getElementById("sub-myshop-phone")) return;
	
	var block = document.getElementById("sub-myshop-phone");
	var string = block.innerHTML.replace(/[\r\n\t ]/g,"");
	var loadCount = 0;
	var fade = new com.fade(block);
	
	var ARR_number_src = {
		0 : "/_common/_img/_sub_00_tel_tex_00.gif",
		1 : "/_common/_img/_sub_00_tel_tex_01.gif",
		2 : "/_common/_img/_sub_00_tel_tex_02.gif",
		3 : "/_common/_img/_sub_00_tel_tex_03.gif",
		4 : "/_common/_img/_sub_00_tel_tex_04.gif",
		5 : "/_common/_img/_sub_00_tel_tex_05.gif",
		6 : "/_common/_img/_sub_00_tel_tex_06.gif",
		7 : "/_common/_img/_sub_00_tel_tex_07.gif",
		8 : "/_common/_img/_sub_00_tel_tex_08.gif",
		9 : "/_common/_img/_sub_00_tel_tex_09.gif"
	};
	var hyphen = "/_common/_img/_sub_00_tel_tex_10.gif";
	
	com.clearChildNodes(block);
	fade.setAlpha(0);
	
	function Num(alt){
		this.alt = alt;
		this.obj = document.createElement("img");
		this.src = (ARR_number_src[this.alt]) ? ARR_number_src[this.alt] : hyphen ;
		this.isLoaded = false;
	}
	Num.prototype = {
		Load : function(){
			block.appendChild(this.obj);
			this.obj.onload = function(){
				loadCount++;
			}
			this.obj.src = this.src;
			this.obj.alt = this.alt;
		}
	}
	
	var num = [];
	for(var i=0 ; i<string.length ; i++){
		num[i] = new Num(string.charAt(i));
		num[i].Load();
	}
	
	var tmpTimerID = setInterval(function(){
		if(loadCount >= string.length){
			clearInterval(tmpTimerID);
			fade.In();
		}
	},0.5 * 1000);
	
});






com._startup_items.push(function(){
	if(!document.body.className || document.body.className.indexOf("popup") == -1) return;
	if(document.body.innerHTML.indexOf("closebutton") == -1) return;
	
	function PopupWindow(obj){
		var P = this;
		this.obj = obj;
		this.urlInfo = com.getUrlInfo();
		this.obj.onclick = function(){ P.Close(); };
	}
	PopupWindow.prototype = {
		Close : function(){
			if(!window.opener || window.opener.closed == true){
				var url = "/";
				if(!this.urlInfo.file || this.urlInfo.file == "index.php"){
					this.urlInfo.directory.array.splice(-1,1);
					url = "/" + this.urlInfo.directory.array.join("/") + "/";
				}
				else{
					url = this.urlInfo.directory.string;
				}
				window.location.href = url;
			}
			else{
				window.close();
			}
		}
	}
	
	var popupuwindow = [];
	
	var tmp = com.getElementsByTagAndClassName("*","closebutton");
	for(var i=0 ; i<tmp.length ; i++){
		popupuwindow[i] = new PopupWindow(tmp[i]);
	}
});




com._startup_items.push(function(){
	if(!document.getElementById("sub-ranking")) return;
	
	var tmp = document.getElementById("sub-ranking").getElementsByTagName("a");
	for(var i=0 ; i<tmp.length ; i++){
		tmp[i].onclick = function(){
			com.popup1(this.href,"detail","700","700");
			return false;
		}
	}
	
	
});









/*
common script lib. Ver.5.0.0
2008.09.09.
*/
