(function(){

	var q=navigator.userAgent.toLowerCase();
	var r=0;

	var u=window.AC=function(a,b,c,d,e){
			return new u.prototype.init(a,b,c,d,e)
		};

		u.extend=function(a,b){
			for(var c in b){
				a[c]=b[c]
				}
				return a
			};

		u.browser={
			version:(q.match(/.+(?:ox|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(q),opera:/opera/.test(q),msie:/msie/.test(q)&&!/opera/.test(q),firefox:/mozilla/.test(q)&&!/(compatible|webkit)/.test(q)};

		u.extend(
					u,
					{
					feature:{	compatMode:document.compatMode,		docType:document.firstChild.systemId||document.firstChild.text||null,
						noFixed:u.browser.msie&&document.compatMode=='BackCompat'||u.browser.msie&&u.browser.version<=6
						},

		$:function(a){
			return typeof(a)=='string'?document.getElementById(a):a
			},


		addDiv:function(a,b){
					var c=document.createElement('div');
					if(a) c.id=a;
					if(b) u.setStyle(c,b);

					try{
						return c
						}finally{
							c=null
						}
					},

		getClient:function(a){
				var a=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase(),body=document.body,doc=document.documentElement,m=u.feature.compatMode;
				return m=='CSS1Compat'?doc['client'+a]:body['client'+a]
				},

		getScroll:function(a){
			var a=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase(),
			body=document.body,
			doc=document.documentElement,
			m=u.feature.compatMode;

			return m=='CSS1Compat'?doc['scroll'+a]:body['scroll'+a]
		},

		getCoor:function(a){
				a=u.$(a);var b=[a.offsetLeft,a.offsetTop];
				var c=a.offsetParent;
				while(c){
					b[0]+=c.offsetLeft;
					b[1]+=c.offsetTop;
					c=c.offsetParent
				}
				return b
				},

		random:function(n){
			n=n||0;
			if(typeof ac_random=='undefined'){
				ac_random=[]
			}

			if(typeof ac_random[n]=='undefined'){
				ac_random[n]=(new Date()).getTime()
			}
			return ac_random[n]
		},

		setStyle:function(a,b){
				var o=u.$(a);
				for(var c in b){
					o.style[c]=b[c]
					}
				},

		getStyle:function(a,b){var o=u.$(a),value=null;if(o.style[b]){value=o.style[b]}if(!value&&o.currentStyle){value=o.currentStyle[b]}if(!value&&window.getComputedStyle){value=document.defaultView.getComputedStyle(o,null)[b]}return value=='auto'?null:value},
		addEvent:function(b,c,d){
			if(b.addEventListener){
				b.addEventListener(c,d,false)
			}else{if(b.attachEvent){
					if(u.hasEvent(b,c,d)!=-1)	return;
					var e=function(a){
						a=u.fixEvent(window.event);
						d.call(b,a)
					};

					b.attachEvent('on'+c,e);
					var f={obj:b,type:c,fn:d,handler:e};
					var g='AC'+u.uid++;
					if(!b.handlerId)b.handlerId=[];
					b.handlerId.push(g);
					if(!u.eventInfo)
						u.eventInfo={};
					u.eventInfo[g]=f;
					if(!u.bindUnload){
						u.bindUnload=true;window.attachEvent('onunload',u.removeAllEvent)}}}

			},

		removeEvent:function(a,b,c){if(a.removeEventListener){a.removeEventListener(b,c,false)}else{if(a.detachEvent){var i=u.hasEvent(a,b,c);if(i==-1)return;var d=a.handlerId[i];var e=u.eventInfo[d];a.detachEvent('on'+b,e.handler);a.handlerId.splice(i,1);delete u.eventInfo[d]}}},

		removeAllEvent:function(){for(var a in u.eventInfo){var b=u.eventInfo[a];b.obj.detachEvent('on'+b.type,b.handler);delete u.eventInfo[a]}},

		hasEvent:function(a,b,c){var d=a.handlerId;if(!d)return-1;for(var i=d.length-1;i>-1;i--){var e=d[i],listener=u.eventInfo[e];if(listener.type==b&&listener.fn==c)return i}return-1},
		fixEvent:function(a){a.pageX=a.clientX+u.getScroll('left');a.pageY=a.clientY+u.getScroll('top');a.preventDefault=function(){a.returnValue=false};return a},

		uid:0,
		ver:'AC.Ver.0.5',
		format:{7:{depth:2,totalState:3,stateList:{splash:['ftb'],expand:['ftb'],dock:['ftb']}},4:{depth:2,totalState:2,stateList:{expand:['ftb','drag'],dock:['ftb','drag']}},5:{depth:1,totalState:2,stateList:{expand:['ftp'],dock:['ftp']}},8:{depth:0},6:{depth:0},10:{depth:0},9:{depth:-1,totalState:2,stateList:{expand:['ftb','ftp'],dock:['ftb']}},11:{depth:3,totalState:4,stateList:{splash:['ftp'],normal:['ftp'],expand:['ftp'],dock:['ftp']}},12:{depth:3,totalState:4,stateList:{splash:['ftb'],normal:['ftb'],expand:['ftb'],dock:['ftb']}}}
		});

		u.Tag=function(a,b,c,d,e){

			if(!b)return;

			this.src = b;
			this.id   = a;
			var f=/_(\d+)$/.exec(a);

			this.width=c;
			this.height=d;
			this.parent=null;

			if(e)this.cu=e;
			this.html='';
			this.params=new Object();
			this.vars=[];

			this.format=null;
			var s=b.toLowerCase();
			var g=s.match(/\.(\w{3,4})\?|\.([^\?\.\/]{3,4})$/);
			if(/swf/.test(g)){
				this.format='swf'}else
					if(/gif|jpg|jpeg|png/.test(g)){
					this.format='img'
					}else{
					this.format='iframe'
				}
			};

			u.Tag.prototype={

				setParam:	function(a,b){this.params[a]=b},
				setVar:function(a,b){this.vars[this.vars.length]=a+'='+b},

				write:function(a){
					if(this.format=='swf'){
						var b='';
						if(document.all){
							b+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="'+this.id+'"'+' name="'+this.id+'"'+' border="0" width="'+this.width+'"'+' height="'+this.height+'"><param name="movie" value="'+this.src+'" /><param name="quality" value="high" /><param name="allowScriptAccess" value="always" /><param name="menu" value="false" /><param name="allowFullScreen" value="true" />';for(var i in this.params){b+='<param name="'+i+'"'+' value="'+this.params[i]+'" />'}if(this.vars.length>0){b+='<param name="flashvars" value="'+this.vars.join('&')+'" />'}b+='</object>'}else{if(document.getElementById){b+='<embed id="'+this.id+'" name="'+this.id+'"'+' width="'+this.width+'"'+' height="'+this.height+'"'+' type="application/x-shockwave-flash" '+'pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" allowFullScreen="true" quality="high" menu="false" ';for(var i in this.params){b+=' '+i+'='+this.params[i]}b+=' src="'+this.src+'" ';if(this.vars.length>0){b+='flashvars="'+this.vars.join('&')+'" '}b+=' />'}}this.html=b

								}else if(this.format=='img'){

								this.html='<a href="'+this.cu+'" title="" target="_blank"><img id="'+this.id+'" src="'+this.src+'" width="'+this.width+'" height="'+this.height+'" alt="" style="border:0;margin:0;padding:0;"/></a>'

							}else{
								this.html='<iframe id="'+this.id+'" src="'+this.src+'" width="'+this.width+'" height="'+this.height+'" frameborder="0" scrolling="no" allowTransparency="true" />'}

							if(a){
								var c=u.$(a);
								c.innerHTML=this.html;
								this.parent=c
								}
								return false
							}
					};

			u.prototype={
					init:function(a,b,d,e,f,g,h){

						if(a&&b instanceof u.Tag&&d!=undefined&&e!=undefined){
							this.format=String(d);
							this.acid=String(f);
							if(h)
								this.destid=String(h);

							var j=u.format[this.format];
							if(!j)return;

							this.depth=j['depth'];
							this.am=parseInt(e);

							if(j['totalState']){
								this.totalState	=	j['totalState'];
								this.stateList	=	j['stateList']
								}

							if(this.stateList){
								if(g){
									this.vars=g;
									for(var i in this.vars){
										this.vars[i].count=0
									}
									this.initParams()
									}
									}

							var k=parseInt(b.width),th=parseInt(b.height),
	 						div=u.addDiv(
										a,{width:k+'px',height:th+'px',margin:'0',padding:'0',left:'0',top:'0'}
									);

							if(this.depth==2||this.depth==1){

								var l='fixed';
								if(u.feature.noFixed){
									l='absolute'
								}

								if(this.depth==1){
									l='absolute'}

								u.setStyle(div,{position:l,zIndex:'182736',height:th+'px'});

								if(u.browser.firefox){
									r=4;
									u.setStyle(div,{overflow:'auto',width:k+r+'px',height:th+r+'px'})
								}

							}else if(this.depth==0){

								u.setStyle(div,{position:'absolute',height:th+'px'});
								var c=u.addDiv();
								c.appendChild(div);

								u.setStyle(c,{position:'relative',width:k+'px',height:th+'px',margin:'0 auto'});div=c
								}else if(this.depth==-1){
									u.setStyle(div,{overflow:'hidden',position:'absolute',margin:'0 auto',left:(u.getClient('width')-k)/2+'px'})
									}else if(this.depth==3){
										u.setStyle(div,{position:'absolute'});
										if(u.browser.firefox)
											div.style.overflow='auto';
										var c=u.addDiv();
										c.appendChild(div);

										u.setStyle(c,{position:'absolute',width:k+'px',height:th+'px'});
										div=c;
									}

								this.activeTag=true;
								this.append(div);

								this.ins=u.$(a);
								this.ins.parent=this;
								this.tag=b;

								if(b.parent){
									this.ins.innerHTML=b.html
									}else{
										b.write(this.ins)
									}
								}
							},

							append:function(a){
									 document.body.insertBefore(a,document.body.firstChild)

//									 if(this.am==1){
//											document.body.insertBefore(a,document.body.firstChild)
//										}else{
//											document.body.appendChild(a)
//										}
								},

								initParams:function(){if(!this.params)this.params={};var p=this.vars;for(var i in this.stateList){this.params[i]={};for(var k=0;k<this.stateList[i].length;k++){var o=this.stateList[i][k];if(p[o]){this.params[i][o]=p[o][p[o].count];p[o].count=p[o].count++>=p[o].length-1?p[o].length-1:p[o].count}else{this.params[i][o]=null}}}this.vars=null},

								setState:function(a){
									this.ftb(a);

//									if(!this.params||!this.stateList)return;
//
//									var b=this.stateList[a],
//										  ep=this.params[a];
//
//										this.state=a;for(var i=0;i<b.length;i++){
//										this[b[i]](ep[b[i]])
//										}
									},

								open:function(b,d,f,t){if(!b)return;if(d){t=t||'';f=f||'toolbar=yes,menubar=yes,location=yes,directories=yes,status=yes,resizable=yes,scrollbars=yes';var e=window.open('about:blank',t,f);if(e!=null){e.blur();e.opener.focus();e.location=b}return}var a=document.createElement('a');if(typeof a.click!='undefined'){a.style.display='none';a.href=b;a.title='';a.target='_blank';var g='ac_js86_'+this.acid,scri=u.$(g);if(!scri){scri=document.body.firstChild};var c=scri.parentNode;c.insertBefore(a,scri);a.click();c.removeChild(a)}else{delete a;window.open(b)}},

								openTwo:function(a,b){var t=t||'',f=f||'toolbar=yes,menubar=yes,location=yes,directories=yes,status=yes,resizable=yes,scrollbars=yes';var m=window.open('about:blank',t,f);window.open(b);m.focus();m.location=a},
								close:function(){this.ins.style.display='none'},
								show:function(){this.ins.style.display='block'},
								setSize:function(w,h,b){var c=this.fm,ins=this.ins,a=this.depth,p=['left','right','top','bottom'];if(c&&a!=3){u.setStyle(this.ins,{left:'-1000px',top:'-1000px'})}if((a==0||a==3)&&b&&b.indexOf('_')!=-1){b=b.toLowerCase();b=b.split('_');for(var i=p.length-1;i>=0;i--){ins.style[p[i]]=null}for(var k=b.length-1;k>=0;k--){ins.style[b[k]]=0}}w=parseInt(w);h=parseInt(h);u.setStyle(this.ins,{width:w+r+'px',height:h+r+'px'});if(this.activeTag){this.setTagSize(w,h)}if(this.f&&a!=3)this.f()},
								setZIndex:function(a){this.ins.style.zIndex=a},
								setParentZIndex:function(a){this.ins.parentNode.style.zIndex=a},
								setTagSize:function(w,h){u.$(this.tag.id).width=w;u.$(this.tag.id).height=h},
								setDepth:function(a){if(a==1){var b='fixed';if(u.feature.noFixed){b='absolute'}u.setStyle(this.ins,{position:b,zIndex:'182736'});if(u.browser.firefox){r=4;u.setStyle(this.ins,{overflow:'auto'})}this.depth=1}else if(a==-1||a==0){this.ins.style.position='static';if(a==-1){this.ins.style.overflow='hidden';this.depth=-1;return}else if(a==0){this.depth=0}}},

								setPosition:function(){
									var a=this.ins,
										coor=this.coor,
										style=a.style,
										cw=u.getClient('width'),
										ch=u.getClient('height'),
										w=parseInt(style.width),
										h=parseInt(style.height),
										noFixed=u.feature.noFixed,
										sl=0,st=0,l=0,t=0;

									if(this.depth==3)
										style=this.ins.parentNode.style;
									if(typeof ac_info_ware!='undefined'){
										if(ac_info_ware[this.acid]){
											if(ac_info_ware[this.acid].coorid){
												var p=u.getCoor(ac_info_ware[this.acid].coorid);
												coor.left=p[0];coor.top=p[1]
												}
											}
										}

										var x=coor.left,
											y=coor.top,fm=this.fm;

										if(fm=='p'){
											cw=u.getClient('width');
											ch=u.getClient('height')
										}

										if(fm=='b'&&noFixed){
											sl=u.getScroll('left');
											st=u.getScroll('top')
										}

										if(this.dm=='0'){
											if(x>=cw-w){x=cw-w}
											if(y>=ch-h){y=ch-h}
										}

										if(String(x).indexOf('%')!=-1){
											l=Math.round((cw-parseInt(w))*parseInt(x)/100)+sl
											}else if(String(x).indexOf('#')!=-1){
												l=Math.round(cw/2)+parseInt(x)+sl
												}else{
													l=parseInt(x)+sl
													}

											if(String(y).indexOf('%')!=-1){
												t=Math.round((ch-parseInt(h))*parseInt(y)/100)+st
												}else if(String(y).indexOf('#')!=-1){
													t=Math.round(ch/2)+parseInt(y)+st
													}else{
														t=parseInt(y)+st
													}

											style.left=l+'px';
											style.top=t+'px'
								},


								// 根据当前浏览器的类型和版本，以及高和宽等属性，调整位置。

								fixed:function(a,b){

										var x,y,ths=this,noFixed=u.feature.noFixed;

										u.removeEvent(window,'resize',ths.f);
										if(b=='b'&&noFixed){
											u.removeEvent(window,'scroll',ths.f)
										}

										if(a==undefined)
										{ return }

										var tmp=this.ins,
											cw=u.getClient('width'),
											ch=u.getClient('height'),
											w=parseInt(tmp.style.width),
											h=parseInt(tmp.style.height);

										x  = cw-w;
										y  = ch-h;

										if(!this.coor)
											this.coor={};

										this.coor.left=x;
										this.coor.top=y;

										this.f=function(){
											return ths.setPosition.call(ths)
										};
										this.f();

										u.addEvent(window,'resize',ths.f);
										if(b=='b'&&noFixed){
											u.addEvent(window,'scroll',ths.f)
											}
									},

								ftp:function(a){this.fm='p';	this.fixed(a,this.fm) },
								ftb:function(a){this.fm='b';	this.fixed(a,this.fm) },

								transform:function(w,h,a,b){

									w=parseInt(w)||0;h=parseInt(h)||0;
									a=parseInt(a)||20;b=parseInt(b)||8;

									var c=parseInt(u.getStyle(this.ins,'width'));
									var d=parseInt(u.getStyle(this.ins,'height'));
									var e=this,dy=0,dx=0,sx=1,sy=1,tw=c,th=d;

									if(h!=d){
										sy=Math.abs(h-d)/(h-d);
										dy=b*sy
									}

									if(w!=c){
										sx=Math.abs(w-c)/(w-c);
										dx=dy*(w-c)/(h-d)
									}

									var f=setInterval(function(){
										th+=dy;
										if(th*sy>=h*sy){

											if(e.blocker)
												u.setStyle(e.blocker,{height:h+'px'});

											u.setStyle(e.ins,{height:h+'px'});
											clearInterval(f);
											if(h==0) e.close()

										}else{
											if(e.blocker)
												u.setStyle(e.blocker,{height:th+'px'});

											u.setStyle(e.ins,{height:th+'px'})
											}
										},a);

										var g=setInterval(function(){
											tw+=dx;
											if(tw*sx>=w*sx){
												if(e.blocker)
													u.setStyle(e.blocker,{width:w+'px'});
												u.setStyle(e.ins,{width:w+'px'});
												clearInterval(g);

												if(w==0)e.close()

											}else{

												if(e.blocker)
													u.setStyle(e.blocker,{width:tw+'px'});
												u.setStyle(e.ins,{width:tw+'px'})

											}},a)},

								f:null,format:null,l:null,k:null,

								addBlocker:function(){var a=this.ins.style;if(typeof ac_info_ware=='undefined')ac_info_ware={};if(!ac_info_ware[this.acid])ac_info_ware[this.acid]={};ac_info_ware[this.acid].coorid='AC_BL86_'+this.acid;var b=u.addDiv('AC_BL86_'+this.acid,{position:'static',left:a.left,top:a.top,width:a.width,height:a.height,margin:'0 auto'});this.blocker=b;this.ins.parentNode.insertBefore(b,this.ins);u.feature.noFixed=1;if(this.f)this.f()},
								removeBlocker:function(){this.k=null;if(this.blocker){this.blocker.parentNode.removeChild(this.blocker);this.blocker=null}if(typeof ac_info_ware!='undefined'&&ac_info_ware[this.acid]&&ac_info_ware[this.acid].coorid)ac_info_ware[this.acid].coorid=null;this.params.dock.ftb=['100%',480]},
								addFollower:function(){var a=this.ins.style,noFixed=u.feature.noFixed;var f=u.addDiv('AC_FL86_'+this.acid,{position:'absolute',left:a.left,top:a.top,width:a.width,height:'1px'});if(!noFixed){f.style.position='fixed'}this.follower=f;var b='ac_js86_'+this.acid;var d=u.$(b);if(!d)return;var c=d.parentNode;c.insertBefore(f,d);var e=this.follower.style;this.l=function(){e.left=a.left;e.top=a.top};this.l();u.addEvent(window,'resize',this.l);if(noFixed){u.addEvent(window,'scroll',this.l)}},
								removeFollower:function(){u.removeEvent(window,'resize',this.l);if(u.feature.noFixed)u.removeEvent(window,'scroll',this.l);this.l=null;this.follower.parentNode.removeChild(this.follower);this.follower=null},
								addHotspot:function(w,h,a,x,y,b){
									var p=['left','right','top','bottom'];
									var c=[];c[0]=x||0;c[1]=y||0;

									var d=u.addDiv('',{cursor:'pointer',zIndex:1827360,position:'absolute',width:w+'px',height:h+'px'});if(a&&a.indexOf('_')!=-1){a=a.toLowerCase();a=a.split('_');for(var k=a.length-1;k>=0;k--){d.style[a[k]]=c[k]}}w=parseInt(w);h=parseInt(h);var e=this.tag.id;

									d.onclick=function(){u.$(e)[b]()};

									if(!this.hotspot){this.hotspot=[]}

									this.follower.appendChild(d);
									this.hotspot.push(d)
								}
					};

								u.prototype.init.prototype=u.prototype;
								u.prototype.drag=function(a){this.dm=a};

								_AD_VERSION_='0.9.2.13'})();