/**
* SK Communications Interaction UI Flash embed Javascript object
* 
* @since 2008.04.28
* @auther pureye4u
* @version 1.0.1
* @copyright SK Communications UI Development Interaction UI Parts
*/
var skiui={}
skiui.ua=navigator.userAgent.toLowerCase();
skiui.isIE=skiui.ua.indexOf('msie')!=-1;
skiui.isWin=skiui.ua.indexOf('win')!=-1;
skiui.isOpera=skiui.ua.indexOf('opera')!=-1;
skiui.ver=null;
skiui.getVer=function(){
	if(skiui.ver!=null) return skiui.ver;
	var axo;
	var e;
	try{
		axo=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.7');
		skiui.ver=axo.GetVariable('$version');
	}catch(e){
	}
	if(!skiui.ver){
		try{
			axo=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
			skiui.ver='WIN 6,0,21,0';
			alo.AllowScriptAccess='sameDomain';
			skiui.ver=axo.GetVariable('$version');
		}catch(e){
		}
	}
	if(!skiui.ver){
		try{
			axo=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.3');
			skiui.ver=axo.GetVariable('$version');
		}catch(e){
		}
	}
	if(!skiui.ver){
		try{
			axo=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.3');
			skiui.ver='WIN 2,0,0,11';
		}catch(e){
			skiui.ver=-1;
		}
	}
};
skiui.getSwfVer=function(){
		var flVer=-1;
	if(navigator.plugins!=null&&navigator.plugins.length>0){
		if(navigator.plugins['Shockwave Flash 2.0']||navigator.plugins['Shockwave Flash']){
			var swVer2=navigator.plugins['Shockwave Flash 2.0']?' 2.0': '';
			var flDesc=navigator.plugins['Shockwave Flash'+swVer2].description;
			var descArr=flDesc.split(' ');
			var tempArrMajor=descArr[2].split('.');
			var verMajor=tempArrMajor[0];
			var verMinor=tempArrMajor[1];
			var verRev=descArr[3];
			if(verRev=='') verRev=descArr[4];
			if(verRev[0]=='d') verRev=verRev.substring(1);
			else if(verRev[0]=='r'){
				verRev=verRev.substring(1);
				if(verRev.indexOf('d')>0) verRev=verRev.substring(0, verRev.indexOf('d'));
			}
			flVer=verMajor+'.'+verMinor+'.'+verRev;
		}
	}else if(skiui.ua.indexOf('webtv/2.6')!=-1) flVer=4;
	else if(skiui.ua.indexOf('webtv/2.5')!=-1) flVer=3;
	else if(skiui.ua.indexOf('webtv')!=-1) flVer=2;
	else if(skiui.isIE&&skiui.isWin&&!skiui.isOpera) flVer=getVer();
	return flVer;
};
skiui.detectFlVer=function(reqMajorVer, reqMinorVer, reqRev){
	var verStr=skiui.getSwfVer();
	var tmpArr;
	var tmpStr;
	var verArr;
	if(verStr==-1) return false;
	else if(verStr!=0){
		if(skiui.isIE&&skiui.isWin&&!skiui.isOpera){
			tmpArr=verStr.split(' ');
			tmpStr=tmpArr[1];
			verArr=tmpStr.split(',');
		}else verArr=verStr.split('.');
		var verMajor=verArr[0];
		var verMinor=verArr[1];
		var verRev=verArr[2];
		if(verMajor>parseFloat(reqMajorVer)) return true;
		else if(verMajor==parseFloat(reqMajorVer)){
			if(verMinor>parseFloat(reqMinorVer)) return true;
			else if(verMinor==parseFloat(reqMinorVer)) if(verRev>=parseFloat(reqRev)) return true;
		}
		return false;
	}
};
skiui.getHTML=function(ieAttrs, params, ffAttrs, reqVer, altId){
	var str='';
	if(skiui.isIE&&skiui.isWin&&!skiui.isOpera){
		str+='<object ';
		for(var p in ieAttrs) str+=p+'="'+ieAttrs[p]+'" ';
		str+='>';
		for(var p in params) str+='<param name="'+p+'" value="'+params[p]+'" />';
		str+='</object>';
	}else{
		var ver=reqVer.split(',');
		if(skiui.detectFlVer(ver[0], ver[1], ver[2])){
			str+='<object ';
			if(/Firefox\/3/.test(navigator.userAgent)){
				str+='style="outline:none;"';
			}
			for(var p in ffAttrs) str+=p+'="'+ffAttrs[p]+'" ';
			str+='></object>';
		}else{
			if(altId!=null&&document.getElementById(altId))
			{
				document.getElementById(altId).style.display='block';
			}
			else
			{
				str+='<p>Require flash player version '+reqVer+'</p><p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>';
			}
		}
	}
	return str;
};
skiui.getArgs=function(src, id, width, height, wmode, flashvars, option){
	var ret={};
	ret.ieAttrs={};
	ret.params={};
	ret.ffAttrs={};
	if(option==null||typeof option!=Object) option={};
	if(option['quality']==null) option['quality']='high';
	if(option['align']==null) option['align']='middle';
	if(option['play']==null) option['play']='true';
	if(option['loop']==null) option['loop']='true';
	if(option['scale']==null) option['scale']='noscale';
	if(option['devicefont']==null) option['devicefont']='false';
	if(option['bgcolor']==null) option['bgcolor']='#ffffff';
	if(option['menu']==null) option['menu']='true';
	if(option['allowFullScreen']==null) option['allowFullScreen']='false';
	if(option['allowScriptAccess']==null) option['allowScriptAccess']='sameDomain';
	if(option['version']==null) option['version']='10,0,0,0';
	ret.ieAttrs['codebase']='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+option['version'];
	ret.ieAttrs['id']=ret.ffAttrs['id']=id;
	ret.ieAttrs['classid']='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000';
	ret.ffAttrs['type']='application/x-shockwave-flash';
	ret.ffAttrs['pluginspage']='http://www.macromedia.com/go/getflashplayer';
	ret.ffAttrs['data']=ret.params['movie']=src;
	ret.ffAttrs['width']=ret.ieAttrs['width']=width;
	ret.ffAttrs['height']=ret.ieAttrs['height']=height;
	ret.ffAttrs['wmode']=ret.params['wmode']=wmode;
	ret.ffAttrs['flashvars']=ret.params['flashvars']=flashvars;
	for(var p in option){
		switch (p){
			case "classid":
				break;
			case "onafterupdate":
			case "onbeforeupdate":
			case "onblur":
			case "oncellchange":
			case "onclick":
			case "ondblclick":
			case "ondrag":
			case "ondragend":
			case "ondragenter":
			case "ondragleave":
			case "ondragover":
			case "ondrop":
			case "onfinish":
			case "onfocus":
			case "onhelp":
			case "onmousedown":
			case "onmouseup":
			case "onmouseover":
			case "onmousemove":
			case "onmouseout":
			case "onkeypress":
			case "onkeydown":
			case "onkeyup":
			case "onload":
			case "onlosecapture":
			case "onpropertychange":
			case "onreadystatechange":
			case "onrowsdelete":
			case "onrowenter":
			case "onrowexit":
			case "onrowsinserted":
			case "onstart":
			case "onscroll":
			case "onbeforeeditfocus":
			case "onactivate":
			case "onbeforedeactivate":
			case "ondeactivate":
			case "type":
				ret.ieAttrs[p]=option[p];
				break;
			case "align":
			case "vspace": 
			case "hspace":
			case "class":
			case "title":
			case "accesskey":
			case "tabindex":
				ret.ffAttrs[p]=ret.ieAttrs[p]=option[p];
				break;
			case "version":
				ret.ver=option[p];
			case "codebase":
				ret.ieAttrs[p]=option[p]+option['version'];
				break;
			default:
				ret.ffAttrs[p]=ret.params[p]=option[p];
		}
	}
	return ret;
};
skiui.addFlash=function(src, id, width, height, wmode, flashvars, altId, option){
	if(width==null) width='100%';
	if(height==null) height='100%';
	if(wmode==null) wmode='window';
	else{
		wmode=wmode.toLowerCase();
		if(wmode!='window'&&wmode!='opaque'&&wmode!='transparent') wmode='window';
	}
	var ret=skiui.getArgs(src, id, width, height, wmode, flashvars, option);
	document.write(skiui.getHTML(ret.ieAttrs, ret.params, ret.ffAttrs, ret.ver, altId));
};
skiui.getEmbed=function(src, id, width, height, wmode, flashvars, altId, option){
	if(width==null) width='100%';
	if(height==null) height='100%';
	if(wmode==null) wmode='window';
	else{
		wmode=wmode.toLowerCase();
		if(wmode!='window'&&wmode!='opaque'&&wmode!='transparent') wmode='window';
	}
	var ret=skiui.getArgs(src, id, width, height, wmode, flashvars, option);
	return skiui.getHTML(ret.ieAttrs, ret.params, ret.ffAttrs, ret.ver, altId);
};


//
window.cyui={};
cyui.browser={};
cyui.browser.userAgent=navigator.userAgent.toLowerCase();
cyui.browser.isOpera=(cyui.browser.userAgent.indexOf('opera')!=-1);
cyui.browser.isSafari=(cyui.browser.userAgent.indexOf('safari')!=-1);
cyui.browser.isIE=(cyui.browser.userAgent.indexOf('msie')!=-1&&!cyui.browser.isOpera);
cyui.browser.isFF=(cyui.browser.userAgent.indexOf('firefox')!=-1);
cyui.$=function(id){
	return document.getElementById(id);
};
cyui.$T=function(name, root){
	if(name.match(':')){
		var str=name.split(':');
		var elements=(root||document).getElementsByTagName(str[0]);
		if(elements.length==0) return undefined;
		var element=[];
		var l=elements.length;
		for(var i=0;i<l;i++) if(elements[i].type==str[1]) element.push(elements[i]);
		return element;
	}else{
		var element=(root||document).getElementsByTagName(name);
		if(element.length==0) element=undefined;
		return element;
	}
};
cyui.dom={};
cyui.dom._getPosition_ie=function(element,parentElement) {
	var parent = null;
	var pos = {x:0,y:0};
	
	var rect = element.getBoundingClientRect();
	pos.x=rect.left + Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);
	pos.y=rect.top + Math.max(document.documentElement.scrollTop, document.body.scrollTop);
	rect=null;
	  
	if (parentElement) {
		var ppos=this._getPosition_ie(parentElement);
		pos.x-=ppos.x;
		pos.y-=ppos.y;
		parentElement=null;
		ppos=null;
	}
	element=null;
	parent=null;
	return {x:isNaN(pos.x)?0:pos.x,y:isNaN(pos.y)?0:pos.y};
};
cyui.dom._getPosition_ff=function(element,parentElement) {
	var parent = null;
	var pos = {x:0,y:0};

	var rect = document.getBoxObjectFor(element);
	pos = {x:rect.x, y:rect.y};
	rect=null;

	if (element.parentNode) { parent = element.parentNode; }
	else { parent = null; }

	while (parent && parent.tagName != 'BODY' && parent.tagName != 'HTML') 
	{
	   pos.x -= parent.scrollLeft;
		 pos.y -= parent.scrollTop;

	   if (parent.parentNode) { parent = parent.parentNode; } 
	   else { parent = null; }
	}
	  
	if (parentElement) {
		var ppos=this._getPosition_ff(parentElement);
		pos.x-=ppos.x;
		pos.y-=ppos.y;
		parentElement=null;
		ppos=null;
	}
	element=null;
	parent=null;
	return {x:isNaN(pos.x)?0:pos.x,y:isNaN(pos.y)?0:pos.y};
};
cyui.dom._getPosition_etc=function(element,parentElement) {
	var parent = null;
	var pos = {x:0,y:0};
	
	pos = {x:element.offsetLeft, y:element.offsetTop};
	parent = element.offsetParent;
	if (parent != element) {
	  while (parent) {
		 pos.x += parent.offsetLeft;
		 pos.y += parent.offsetTop;
		 parent = parent.offsetParent;
	  }
	}
	if (cyui.browser.isOpera||( cyui.browser.isSafari && element.style.position == 'absolute')) {
	  pos.x -= document.body.offsetLeft;
	  pos.y -= document.body.offsetTop;
	} 
		  
	if (parentElement) {
		var ppos=this._getPosition_etc(parentElement);
		pos.x-=ppos.x;
		pos.y-=ppos.y;
		parentElement=null;
		ppos=null;
	}
	element=null;
	parent=null;
	return {x:isNaN(pos.x)?0:pos.x,y:isNaN(pos.y)?0:pos.y};
};
cyui.dom._getPosition=null,
cyui.dom.getPos=function(element,parentElement) {
	if (!cyui.dom._getPosition) {
		if (element.getBoundingClientRect) cyui.dom._getPosition=cyui.dom._getPosition_ie;
		else if (document.getBoxObjectFor) cyui.dom._getPosition=cyui.dom._getPosition_ff;
		else cyui.dom._getPosition=cyui.dom._getPosition_etc;
	}
	return cyui.dom._getPosition(element,parentElement);
};
cyui.dom.getPadding=function(element) {
	var l=parseInt(cyui.style.get(element,'paddingLeft'),10);
	var t=parseInt(cyui.style.get(element,'paddingTop'),10);
	var r=parseInt(cyui.style.get(element,'paddingRight'),10);
	var b=parseInt(cyui.style.get(element,'paddingBottom'),10);
	return {left:isNaN(l)?0:l,top:isNaN(t)?0:t,right:isNaN(r)?0:r,bottom:isNaN(b)?0:b};
};
cyui.dom.getSize=function(element){
	return {width:element.offsetWidth,height:element.offsetHeight};
};
cyui.dom.getBorderWidth=function(element){
	var l=parseInt(cyui.style.get(element,'borderLeftWidth'),10);
	var t=parseInt(cyui.style.get(element,'borderTopWidth'),10);
	var r=parseInt(cyui.style.get(element,'borderRightWidth'),10);
	var b=parseInt(cyui.style.get(element,'borderBottomWidth'),10);
	return {left:isNaN(l)?0:l,top:isNaN(t)?0:t,right:isNaN(r)?0:r,bottom:isNaN(b)?0:b};
};
cyui.event={};
cyui.event.hnd=[];
cyui.event.Dispatcher=function(){
	var q={};
	this.addListener=function(evt, fnc, tar, args){
		if(!q[evt]) q[evt]=[];
		q[evt].push([fnc,tar,args]);
		return true;
	};
	this.removeListener=function(evt, fnc){
		if(!q[evt]) return false;
		var l=q[evt].length;
		for(var i=0;i<l;i++){
			if(q[evt][i][0]==fnc){
				q[evt].splice(i, 1);
				return true;
			}
		}
	};
	this.dispatch=function(evt){
		if(!q[evt]) return false;
		var l=q[evt].length;
		for(var i=0;i<l;i++){
			if(q[evt][i][1]&&q[evt][i][2]) q[evt][i][0].apply(q[evt][i][1], q[evt][i][2]);
			else q[evt][i][0]();
		}
		return true;
	};
};
cyui.event.remove=function(hnd){
	if (window.removeEventListener) hnd[0].removeEventListener(hnd[1], hnd[2], false);
	else if (window.detachEvent) hnd[0].detachEvent('on'+hnd[1], hnd[2]);
};
cyui.event.TweenEvent={
	TWEEN_COMPLETE:'tweenComplete'
};
cyui.event.add=function(obj, evt, fnc){
	if (window.addEventListener) obj.addEventListener(evt, fnc, false);
	else if (window.attachEvent) obj.attachEvent( 'on'+evt, fnc );
	return [obj, evt, fnc];
};
cyui.transition={};
cyui.transition.ease={
	easeNone:function(t, b, c, d){
		return c*t/d+b;
	},
	easeInQuad:function(t, b, c, d){
		return c*(t/=d)*t+b;
	},
	easeOutQuad:function(t, b, c, d){
		return -c *(t/=d)*(t-2)+b;
	},
	easeInOutQuad:function(t, b, c, d){
		if ((t/=d/2) < 1) return c/2*t*t+b;
		return -c/2*((--t)*(t-2)-1)+b;
	},
	easeOutInQuad:function(t, b, c, d){
		if (t < d/2) return ease.easeOutQuad (t*2, b, c/2, d);
		return ease.easeInQuad((t*2)-d, b+c/2, c/2, d);
	},
	easeInCubic:function(t, b, c, d){
		return c*(t/=d)*t*t+b;
	},
	easeOutCubic:function(t, b, c, d){
		return c*((t=t/d-1)*t*t+1)+b;
	},
	easeInOutCubic:function(t, b, c, d){
		if ((t/=d/2) < 1) return c/2*t*t*t+b;
		return c/2*((t-=2)*t*t+2)+b;
	},
	easeOutInCubic:function(t, b, c, d){
		if (t < d/2) return ease.easeOutCubic (t*2, b, c/2, d);
		return ease.easeInCubic((t*2)-d, b+c/2, c/2, d);
	},
	easeInQuart:function(t, b, c, d){
		return c*(t/=d)*t*t*t+b;
	},
	easeOutQuart:function(t, b, c, d){
		return -c*((t=t/d-1)*t*t*t-1)+b;
	},
	easeInOutQuart:function(t, b, c, d){
		if ((t/=d/2) < 1) return c/2*t*t*t*t+b;
		return -c/2*((t-=2)*t*t*t-2)+b;
	},
	easeOutInQuart:function(t, b, c, d){
		if (t < d/2) return ease.easeOutQuart (t*2, b, c/2, d);
		return ease.easeInQuart((t*2)-d, b+c/2, c/2, d);
	},
	easeInQuint:function(t, b, c, d){
		return c*(t/=d)*t*t*t*t+b;
	},
	easeOutQuint:function(t, b, c, d){
		return c*((t=t/d-1)*t*t*t*t+1)+b;
	},
	easeInOutQuint:function(t, b, c, d){
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t+b;
		return c/2*((t-=2)*t*t*t*t+2)+b;
	},
	easeOutInQuint:function(t, b, c, d){
		if (t < d/2) return ease.easeOutQuint (t*2, b, c/2, d);
		return ease.easeInQuint((t*2)-d, b+c/2, c/2, d);
	},
	easeInSine:function(t, b, c, d){
		return -c*Math.cos(t/d*(Math.PI/2))+c+b;
	},
	easeOutSine:function(t, b, c, d){
		return c*Math.sin(t/d*(Math.PI/2))+b;
	},
	easeInOutSine:function(t, b, c, d){
		return -c/2*(Math.cos(Math.PI*t/d)-1)+b;
	},
	easeOutInSine:function(t, b, c, d){
		if (t < d/2) return ease.easeOutSine (t*2, b, c/2, d);
		return ease.easeInSine((t*2)-d, b+c/2, c/2, d);
	},
	easeInExpo:function(t, b, c, d){
		return (t==0) ? b : c*Math.pow(2, 10*(t/d-1))+b-c*0.001;
	},
	easeOutExpo:function(t, b, c, d){
		return (t==d) ? b+c : c*1.001*(-Math.pow(2, -10*t/d)+1)+b;
	},
	easeInOutExpo:function(t, b, c, d){
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2*Math.pow(2, 10*(t-1))+b-c*0.0005;
		return c/2*1.0005*(-Math.pow(2, -10*--t)+2)+b;
	},
	easeOutInExpo:function(t, b, c, d){
		if (t < d/2) return ease.easeOutExpo (t*2, b, c/2, d);
		return ease.easeInExpo((t*2)-d, b+c/2, c/2, d);
	},
	easeInCirc:function(t, b, c, d){
		return -c*(Math.sqrt(1-(t/=d)*t)-1)+b;
	},
	easeOutCirc:function(t, b, c, d){
		return c*Math.sqrt(1-(t=t/d-1)*t)+b;
	},
	easeInOutCirc:function(t, b, c, d){
		if ((t/=d/2) < 1) return -c/2*(Math.sqrt(1-t*t)-1)+b;
		return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;
	},
	easeOutInCirc:function(t, b, c, d){
		if (t < d/2) return ease.easeOutCirc (t*2, b, c/2, d);
		return ease.easeInCirc((t*2)-d, b+c/2, c/2, d);
	},
	easeInElastic:function(t, b, c, d){
		var p;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		var s, a;
		if (!a || a < Math.abs(c)) { a=c; s=p/4; }
		else s = p/(2*Math.PI)*Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1))*Math.sin( (t*d-s)*(2*Math.PI)/p ))+b;
	},
	easeOutElastic:function(t, b, c, d){
		var p;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		var s, a;
		if (!a || a < Math.abs(c)) { a=c; s=p/4; }
		else s = p/(2*Math.PI)*Math.asin (c/a);
		return (a*Math.pow(2,-10*t)*Math.sin( (t*d-s)*(2*Math.PI)/p )+c+b);
	},
	easeInOutElastic:function(t, b, c, d){
		var p;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		var s;
		var a;
		if (!a || a < Math.abs(c)) { a=c; s=p/4; }
		else s = p/(2*Math.PI)*Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1))*Math.sin( (t*d-s)*(2*Math.PI)/p ))+b;
		return a*Math.pow(2,-10*(t-=1))*Math.sin( (t*d-s)*(2*Math.PI)/p )*.5+c+b;
	},
	easeOutInElastic:function(t, b, c, d){
		if (t < d/2) return ease.easeOutElastic (t*2, b, c/2, d, a, p);
		return ease.easeInElastic((t*2)-d, b+c/2, c/2, d, a, p);
	},
	easeInBack:function(t, b, c, d){
		var s;
		if (!s) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t-s)+b;
	},
	easeOutBack:function(t, b, c, d){
		var s;
		if (!s) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;
	},
	easeInOutBack:function(t, b, c, d){
		var s;
		if (!s) s = 1.70158;
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;
	},
	easeOutInBack:function(t, b, c, d){
		if (t < d/2) return ease.easeOutBack (t*2, b, c/2, d, s);
		return ease.easeInBack((t*2)-d, b+c/2, c/2, d, s);
	},
	easeInBounce:function(t, b, c, d){
		return c-ease.easeOutBounce (d-t, 0, c, d)+b;
	},
	easeOutBounce:function(t, b, c, d){
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t)+b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;
		}
	},
	easeInOutBounce:function(t, b, c, d){
		if (t < d/2) return ease.easeInBounce (t*2, 0, c, d)*.5+b;
		else return ease.easeOutBounce (t*2-d, 0, c, d)*.5+c*.5+b;
	},
	easeOutInBounce:function(t, b, c, d){
		if (t < d/2) return ease.easeOutBounce (t*2, b, c/2, d);
		return ease.easeInBounce((t*2)-d, b+c/2, c/2, d);
	}
};
cyui.transition.Tween=function(_oTarget, _sProperty, _iBegin, _iFinish, _sUnit, _iDuration, _iFrameRate, _sEaseType){
	var _iIndex=null;
	var _iFrameSecond=null;
	var _hndTimer=null;
	var _aValue=[];
	var _hndListener=[];
	var _hndEventQueue={};
	var _evtDispatcher=null;
	// Constructor
	var init=function(){
		// Check arguments
		if(_oTarget==null||_sProperty==null||_iBegin==null||_iFinish==null||_sUnit==null||!!!_iDuration||!!!_iFrameRate||!!!_sEaseType){
			alert('Any argument is not input.');
			return false;
		}else if((typeof _oTarget!='object')||(typeof _sProperty!='string')||(typeof _iBegin!='number')||(typeof _iFinish!='number')||(typeof _sUnit!='string')||(typeof _iDuration!='number')||(typeof _iFrameRate!='number')||(typeof _sEaseType!='string')){
			alert('Any argument is not correct.');
			return false;
		}
		_evtDispatcher=new cyui.event.Dispatcher();
		vInitalize();
	};
	// Initalize
	var vInitalize=function(){
		_iIndex=-1;
		_iFrameSecond=1000/_iFrameRate;
		_aValue=aGetValue(_sEaseType);
	};
	// Get values
	var aGetValue=function(sEaseType){
		var rtn=[];
		var dist=_iFinish-_iBegin;
		var l=_iFrameRate*_iDuration;
		for(var i=1; i <= l; i++) rtn.push(Math.round(cyui.transition.ease[sEaseType](i, _iBegin, dist, l)));
		return rtn;
	};
	// Get begin
	this.getProperty=function(){
		return _sProperty;
	};
	// Set begin
	this.setProperty=function(sProperty){
		if(typeof sProperty!='string') return false;
		if(_hndTimer==null&&_sProperty!=sProperty){
			_sProperty=sProperty;
			return true;
		}
	};
	// Get begin
	this.getBegin=function(){
		return _iBegin;
	};
	// Set begin
	this.setBegin=function(iBegin){
		if(typeof iBegin!='number') return false;
		if(_hndTimer==null&&_iBegin!=iBegin){
			_iBegin=iBegin;
			vInitalize();
			return true;
		}
	};
	// Get finish
	this.getFinish=function(){
		return _iFinish;
	};
	// Set finish
	this.setFinish=function(iFinish){
		if(typeof iFinish!='number') return false;
		if(_hndTimer==null&&_iFinish!=iFinish){
			_iFinish=iFinish;
			vInitalize();
			return true;
		}
	};
	// Get unit
	this.getUnit=function(){
		return _sUnit;
	};
	// Set unit
	this.setUnit=function(sUnit){
		if(typeof sUnit!='string') return false;
		_sUnit=sUnit;
		return true;
	};
	// Get position
	this.getPosition=function(){
		return _aValue[_iIndex];
	};
	// Set position
	this.setPosition=function(iIndex){
		if(typeof iIndex!='number') return false;
		if(_hndTimer==null&&_iIndex!=iIndex&&iIndex<_aValue.length) _iIndex=iIndex;
		return true;
	};
	// Tween
	var vTween=function(){
		if(_iIndex+1<_aValue.length){
			_iIndex++;
			_oTarget[_sProperty]=_aValue[_iIndex]+_sUnit;
			_hndTimer=setTimeout(vTween, _iFrameSecond);
		}else{
			clearTimeout(_hndTimer);
			_hndTimer=null;
			_evtDispatcher.dispatch(cyui.event.TweenEvent.TWEEN_COMPLETE);
		}
	};
	// Is play
	this.isPlay=function(){
		return !!_hndTimer;
	};
	// Start tween
	this.start=function(){
		if(_hndTimer==null){
			_iIndex=-1;
			_hndTimer=setTimeout(vTween, _iFrameSecond);
		}
	};
	// Stop tween
	this.stop= function(){
		if(_hndTimer!=null){
			clearTimeout(_hndTimer);
			_hndTimer=null;
		}
	};
	// Add event
	this.addListener= function(sEventType, fncCallBack, oTarget, aArgs){
		_evtDispatcher.addListener(sEventType, fncCallBack, oTarget, aArgs);
	};
	init();
};
cyui.float=function(_sTargetId, _iTop, _iDelay, _sEaseType){
	var _iPosition=null;
	var _iTimer=null;
	var _twTween=null;
	var init=function(){
		// Check parameter
		if(!_sTargetId||typeof _sTargetId!= 'string'){
			alert( 'Parameter is not input or type of parameter is wrong.' );
			return false;
		}
		if(!_iTop||typeof _iTop!='number') _iTop = 0;
		if(!_iDelay||typeof _iTop!='number') _iDelay = 0;
		if(!_sEaseType||typeof _sEaseType!='string') _sEaseType = 'easeOutCubic';
		// Choose when initalize
		if(!!cyui.$(_sTargetId)){
			vInitalize();
			return true;
		}else{
			cyui.event.add(window, 'load', vInitalize);
		}
	};
	//Initalize
	var vInitalize=function(){
		if(!cyui.$(_sTargetId)){
			alert('Argument for _sTargetId is not a id of document element.');
			return false;
		}
		_iPosition=!!document.documentElement.scrollTop?document.documentElement.scrollTop+_iTop:document.body.scrollTop+_iTop;
		_twTween=new cyui.transition.Tween(cyui.$(_sTargetId).style, 'top', _iTop, _iTop, 'px', 0.5, 48, _sEaseType);
		cyui.event.add(window, 'scroll', hndScroll);
		vSetPosition();
	};
	//Scroll handler
	var hndScroll=function(){
		_iPosition=!!document.documentElement.scrollTop?document.documentElement.scrollTop+_iTop:document.body.scrollTop+_iTop;
		if(_iTimer){
			clearTimeout(_iTimer);
			_iTimer=null;
		}
		_iTimer=setTimeout(vSetPosition, 100);
	};
	//Set position when scroll
	var vSetPosition=function(){
		var posTop=!!document.documentElement.scrollTop?document.documentElement.scrollTop+_iTop:document.body.scrollTop+_iTop;
		if(_iPosition==posTop){
			if(_twTween.isPlay()) _twTween.stop();
			_twTween.setBegin(_twTween.getPosition());
			_twTween.setFinish(posTop);
			_twTween.start();
		}
	};
	init();
};
cyui.Scroll=function(_sTargetId, _sScrollCSS){
	var _hndListener = [];
	var _iPosition = 0;
	var _iMouseOffset = null;
	var _iMouseY = null;
	var _elHandle = null;
	var _iRailHeight = null;
	var _iHandleHeight = null;
	var _bMouseDown = false;
	var _oOrgSize = null;
	var _iScrollWidth = null;
	// Constructor
	var init=function(){
		// Check arguments
		if(!_sTargetId||!_sScrollCSS){
			alert('Any argument is not input.');
			return false;
		}else if((typeof _sTargetId!='string')||(typeof _sScrollCSS!='string')){
			alert('Any argument is not correct.');
			return false;
		}
		// Choose when initalize
		if(!!cyui.$(_sTargetId)&&!!cyui.css.get('.'+_sScrollCSS)){
			vInitalize();
			return true;
		}else{
			cyui.event.add(window, 'load', vInitalize);
		}
	};
	// Initalize
	var vInitalize=function(){
		if(!cyui.$(_sTargetId)||!cyui.css.get('.'+_sScrollCSS)){
			alert('Argument for _sTargetId is not a id of document element.');
			return false;
		}
		var elTarget=cyui.$(_sTargetId);
		var elWrapper=document.createElement('DIV');
		// Swap element
		elTarget.parentNode.insertBefore(elWrapper, elTarget);
		elWrapper.appendChild(elTarget);
		_oOrgSize=cyui.dom.getSize(elTarget);
		var oScrollCSS=cyui.css.get('.'+_sScrollCSS);
		var aImage=oScrollCSS.backgroundImage.replace('url(', '').replace(')', '').split(',');
		var sOrgBorderWidth=cyui.dom.getBorderWidth(elTarget);
		var sOrgPadding=cyui.dom.getPadding(elTarget);
		_iScrollWidth=parseInt(oScrollCSS.width, 10);
		var oWrapSize={};
		oWrapSize.width=_oOrgSize.width-sOrgBorderWidth.left-sOrgBorderWidth.right;
		oWrapSize.height=_oOrgSize.height-sOrgBorderWidth.top-sOrgBorderWidth.bottom;
		cyui.style.set(elWrapper, 'position', 'relative');
		cyui.style.set(elWrapper, 'width', oWrapSize.width+'px');
		cyui.style.set(elWrapper, 'height', oWrapSize.height+'px');
		cyui.style.set(elWrapper, 'marginTop', cyui.style.get(elTarget, 'marginTop'));
		cyui.style.set(elWrapper, 'marginRight', cyui.style.get(elTarget, 'marginRight'));
		cyui.style.set(elWrapper, 'marginBottom', cyui.style.get(elTarget, 'marginBottom'));
		cyui.style.set(elWrapper, 'marginLeft', cyui.style.get(elTarget, 'marginLeft'));
		cyui.style.set(elWrapper, 'borderTopStyle', cyui.style.get(elTarget, 'borderTopStyle'));
		cyui.style.set(elWrapper, 'borderRightStyle', cyui.style.get(elTarget, 'borderRightStyle'));
		cyui.style.set(elWrapper, 'borderBottomStyle', cyui.style.get(elTarget, 'borderBottomStyle'));
		cyui.style.set(elWrapper, 'borderLeftStyle', cyui.style.get(elTarget, 'borderLeftStyle'));
		cyui.style.set(elWrapper, 'borderTopColor', cyui.style.get(elTarget, 'borderTopColor'));
		cyui.style.set(elWrapper, 'borderRightColor', cyui.style.get(elTarget, 'borderRightColor'));
		cyui.style.set(elWrapper, 'borderBottomColor', cyui.style.get(elTarget, 'borderBottomColor'));
		cyui.style.set(elWrapper, 'borderLeftColor', cyui.style.get(elTarget, 'borderLeftColor'));
		cyui.style.set(elWrapper, 'borderTopWidth', cyui.style.get(elTarget, 'borderTopWidth'));
		cyui.style.set(elWrapper, 'borderRightWidth', cyui.style.get(elTarget, 'borderRightWidth'));
		cyui.style.set(elWrapper, 'borderBottomWidth',cyui.style.get(elTarget, 'borderBottomWidth'));
		cyui.style.set(elWrapper, 'borderLeftWidth', cyui.style.get(elTarget, 'borderLeftWidth'));
		cyui.style.set(elWrapper, 'overflow', 'hidden');
		cyui.style.set(elTarget, 'position', 'absolute');
		cyui.style.set(elTarget, 'margin', '0');
		cyui.style.set(elTarget, 'borderWidth', '0');
		cyui.style.set(elTarget, 'width', oWrapSize.width-_iScrollWidth-sOrgPadding.left-sOrgPadding.right+'px');
		cyui.style.set(elTarget, 'height', 'auto');
		cyui.style.set(elTarget, 'overflow', 'visible');
		var elScrollBase=document.createElement('DIV');
		elWrapper.appendChild(elScrollBase);
		cyui.style.set(elScrollBase, 'position', 'absolute');
		cyui.style.set(elScrollBase, 'right', '0');
		cyui.style.set(elScrollBase, 'top', '0');
		cyui.style.set(elScrollBase, 'width', _iScrollWidth+'px');
		cyui.style.set(elScrollBase, 'height', oWrapSize.height+'px');
		var elScrollTopButton=document.createElement('DIV');
		elScrollBase.appendChild(elScrollTopButton);
		cyui.style.set(elScrollTopButton, 'height', oScrollCSS.marginTop);
		cyui.style.set(elScrollTopButton, 'backgroundImage', 'url('+aImage[0]+')');
		cyui.style.set(elScrollTopButton, 'backgroundRepeat', 'no-repeat');
		cyui.style.set(elScrollTopButton, 'backgroundPosition', '0 0');
		_iRailHeight=oWrapSize.height-parseInt(oScrollCSS.marginTop, 10)-parseInt(oScrollCSS.marginBottom, 10);
		var elScrollRail=document.createElement('DIV');
		elScrollBase.appendChild(elScrollRail);
		cyui.style.set(elScrollRail, 'height', _iRailHeight+'px');
		cyui.style.set(elScrollRail, 'position', 'relative');
		cyui.style.set(elScrollRail, 'backgroundImage', 'url('+aImage[1]+')');
		cyui.style.set(elScrollRail, 'backgroundRepeat', 'repeat-y');
		var iPosY=parseInt(oScrollCSS.marginTop, 10)+parseInt(oScrollCSS.marginBottom, 10);
		var elRailTop=document.createElement('DIV');
		elScrollRail.appendChild(elRailTop);
		cyui.style.set(elRailTop, 'width', _iScrollWidth+'px');
		cyui.style.set(elRailTop, 'height', oScrollCSS.borderTopWidth);
		cyui.style.set(elRailTop, 'position', 'absolute');
		cyui.style.set(elRailTop, 'backgroundImage', 'url('+aImage[0]+')');
		cyui.style.set(elRailTop, 'backgroundRepeat', 'no-repeat');
		cyui.style.set(elRailTop, 'backgroundPosition', '0 -'+iPosY+'px');
		iPosY+=parseInt(oScrollCSS.borderTopWidth, 10);
		var elRailBottom=document.createElement('DIV');
		elScrollRail.appendChild(elRailBottom);
		cyui.style.set(elRailBottom, 'width', _iScrollWidth+'px');
		cyui.style.set(elRailBottom, 'bottom', '0');
		cyui.style.set(elRailBottom, 'position', 'absolute');
		cyui.style.set(elRailBottom, 'backgroundImage', 'url('+aImage[0]+')');
		cyui.style.set(elRailBottom, 'backgroundRepeat', 'no-repeat');
		cyui.style.set(elRailBottom, 'backgroundPosition', '0 -'+iPosY+'px');
		_elHandle=document.createElement('DIV');
		elScrollRail.appendChild(_elHandle);
		cyui.style.set(_elHandle, 'width', _iScrollWidth+'px');
		cyui.style.set(_elHandle, 'position', 'absolute');
		iPosY+=parseInt(oScrollCSS.borderBottomWidth, 10);
		var elHandleTop=document.createElement('DIV');
		_elHandle.appendChild(elHandleTop);
		cyui.style.set(elHandleTop, 'height', oScrollCSS.paddingTop);
		cyui.style.set(elHandleTop, 'backgroundImage', 'url('+aImage[0]+')');
		cyui.style.set(elHandleTop, 'backgroundRepeat', 'no-repeat');
		cyui.style.set(elHandleTop, 'backgroundPosition', '0 -'+iPosY+'px');
		_oOrgSize=cyui.dom.getSize(elTarget);
		_iHandleHeight=parseInt(oWrapSize.height*_iRailHeight/_oOrgSize.height, 10);
		var elHandleMid=document.createElement('DIV');
		_elHandle.appendChild(elHandleMid);
		cyui.style.set(elHandleMid, 'height', (_iHandleHeight-parseInt(oScrollCSS.paddingTop, 10)-parseInt(oScrollCSS.paddingBottom, 10))+'px');
		cyui.style.set(elHandleMid, 'overflow', 'hidden');
		cyui.style.set(elHandleMid, 'backgroundImage', 'url('+aImage[1]+')');
		cyui.style.set(elHandleMid, 'backgroundRepeat', 'repeat-y');
		cyui.style.set(elHandleMid, 'backgroundPosition', '-'+_iScrollWidth+'px 0');
		iPosY+=parseInt(oScrollCSS.paddingTop, 10);
		var elHandleBottom=document.createElement('DIV');
		_elHandle.appendChild(elHandleBottom);
		cyui.style.set(elHandleBottom, 'height', oScrollCSS.paddingTop);
		cyui.style.set(elHandleBottom, 'backgroundImage', 'url('+aImage[0]+')');
		cyui.style.set(elHandleBottom, 'backgroundRepeat', 'no-repeat');
		cyui.style.set(elHandleBottom, 'backgroundPosition', '0 -'+iPosY+'px');
		var elScrollBottomButton=document.createElement('DIV');
		elScrollBase.appendChild(elScrollBottomButton);
		cyui.style.set(elScrollBottomButton, 'height', oScrollCSS.marginBottom);
		cyui.style.set(elScrollBottomButton, 'backgroundImage', 'url('+aImage[0]+')');
		cyui.style.set(elScrollBottomButton, 'backgroundRepeat', 'no-repeat');
		cyui.style.set(elScrollBottomButton, 'backgroundPosition', '0 -'+oScrollCSS.marginTop);
		// Add event handler
		cyui.event.add(elScrollTopButton, 'click', hndTopButtonClick);
		cyui.event.add(elScrollTopButton, 'mousedown', hndButtonMouseDown);
		cyui.event.add(elScrollTopButton, 'mouseup', hndButtonMouseUp);
		cyui.event.add(elScrollTopButton, 'mouseout', hndButtonMouseUp);
		cyui.event.add(elScrollBottomButton, 'click', hndBottomButtonClick);
		cyui.event.add(elScrollBottomButton, 'mousedown', hndButtonMouseDown);
		cyui.event.add(elScrollBottomButton, 'mouseup', hndButtonMouseUp);
		cyui.event.add(elScrollBottomButton, 'mouseout', hndButtonMouseUp);
		cyui.event.add(_elHandle, 'mousedown', hndMouseDown);
		var oBaseTarget=cyui.browser.isFF?window:document.body;
		cyui.event.add(oBaseTarget, 'mousemove', hndMouseMove);
		cyui.event.add(oBaseTarget, 'mousedown', hndBodyMouseDown);
		cyui.event.add(oBaseTarget, 'mouseup', hndMouseUp);
		cyui.event.add(oBaseTarget, 'mouseup', hndBodyMouseUp);
		if(cyui.browser.isFF) cyui.event.add(elTarget, 'DOMMouseScroll', hndMouseWheel);
		else cyui.event.add(elTarget, 'mousewheel', hndMouseWheel);
		_iBaseY=cyui.dom.getPos(elScrollRail).y;
	};
	// Top button click handler
	var hndTopButtonClick=function(e){
		if(_iPosition>0){
			_iPosition=_iPosition-10<0?0:_iPosition-10;
			vScrollTo(_iPosition);
		}
	};
	// Bottom button click handler
	var hndBottomButtonClick=function(e){
		if(_iPosition<(_iRailHeight-_iHandleHeight)){
			_iPosition=(_iPosition+10)>(_iRailHeight-_iHandleHeight)?_iRailHeight-_iHandleHeight:_iPosition+10;
			vScrollTo(_iPosition);
		}
	};
	// Button mouse down handler
	var hndButtonMouseDown=function(e){
		var e=window.event?window.event:e;
		var oTarget=e.srcElement?e.srcElement:e.target;
		var aBgPosition=cyui.style.get(oTarget, 'backgroundPosition').split(' ');
		aBgPosition[0]='-'+_iScrollWidth+'px';
		cyui.style.set(oTarget, 'backgroundPosition', aBgPosition[0]+' '+aBgPosition[1]);
	};
	// Button mouse up handler
	var hndButtonMouseUp=function(e){
		var e=window.event?window.event:e;
		var oTarget=e.srcElement?e.srcElement:e.target;
		var aBgPosition=cyui.style.get(oTarget, 'backgroundPosition').split(' ');
		aBgPosition[0]='0';
		cyui.style.set(oTarget, 'backgroundPosition', aBgPosition[0]+' '+aBgPosition[1]);
	};
	// Mouse down handler
	var hndMouseDown=function(e){
		var e=window.event?window.event:e;
		var oTarget=e.srcElement?e.srcElement:e.target;
		_iMouseY=e.pageY?e.pageY:document.documentElement.scrollTop+e.clientY;
		_iMouseOffset=cyui.dom.getPos(_elHandle).y-_iMouseY;
	};
	// Mouse move handler
	var hndMouseMove=function(e){
		if(_iMouseY&&_bMouseDown){
			var e=window.event?window.event:e;
			var oTarget=e.srcElement?e.srcElement:e.target;
			_iMouseY=e.pageY?e.pageY:document.documentElement.scrollTop+e.clientY;
			var posTop=_iMouseY-_iBaseY+_iMouseOffset;
			if(posTop<0) posTop = 0;
			else if(posTop>_iRailHeight-_iHandleHeight) posTop=_iRailHeight-_iHandleHeight;
			_iPosition=posTop;
			vScrollTo(_iPosition);
		}
	};
	// Mouse up handler
	var hndMouseUp=function(e){
		_iMouseY=null;
		_iMouseOffset=null;
	};
	// Body mouse down handler
	var hndBodyMouseDown=function(e){
		_bMouseDown = true;
	};
	// Body mouse up handler
	var hndBodyMouseUp=function(e){
		_bMouseDown = false;
	};
	// Mouse wheel handler
	var hndMouseWheel=function(e){
		if(window.event){
			e=window.event;
			e.returnValue=false;
		}else{
			if(e.preventDefault){
				e.preventDefault();
			}
		}
		var delta=e.detail?e.detail/3:-e.wheelDelta/120;
		var posTop=_iPosition+(10*delta);
		if(posTop<0) posTop=0;
		else if(posTop>_iRailHeight-_iHandleHeight) posTop=_iRailHeight-_iHandleHeight;
		_iPosition=posTop;
		vScrollTo(_iPosition);
	};
	// Get top position of target element to scroll
	var iGetScrollTop=function(iScrollBarTop){
		return parseInt(iScrollBarTop*_oOrgSize.height/_iRailHeight);
	};
	// Scroll to position
	var vScrollTo=function(iPosition){
		cyui.style.set(_elHandle, 'top', iPosition+'px');
		cyui.style.set(cyui.$(_sTargetId), 'top', '-'+iGetScrollTop(iPosition)+'px');
	};
	init();
};