﻿/*
*
*	© Framework jSun, Breno Lima de Freitas
*	http://jsun.wikia.com/
*	v 1.33 (20:59 04/10/2010 - BRA)
*
*/

window.js=function(id){
	if(typeof id=='object')return id;
	else if(id=='*')return document.getElementsByTagName('*');
	else if(id.charAt(0)=='<'&&id.charAt(id.length-1)=='>')return document.getElementsByTagName(id.sbs(1,-1));
	/*beta*/else if(id.indexOf('=>')!=-1){
		id=id.replace(/\s/,'');
		id=id.split('=>');
		
		
		var pr=js(id[0]);
		if(!pr||!pr.childNodes||!pr.childNodes.length)return null;
		var ch=pr.childNodes;
		
		for(var i=1;i<id.length;i++){
			for(var j=0;j<ch.length;j++){
				if(ch[j].nodeType==1&&ch[j].id&&ch[j].id==id[i]){
					ch=ch[j].childNodes&&ch[j].childNodes[0].nodeType==1?ch[j].childNodes:ch[j];
					break;
				}
			}
		}
		
		return ch;
	}else if(id.charAt(0)=='.'){
		var o=js('*');
		var cl=id.substr(1);
		var r=[];
		for(var i=0,e,p=0;e=o[i];i++)if(e.className==cl)r[p++]=e;
		if(r.length==1)r=r[0];
		return r;
	}
	else if(typeof id=='string'||id.charAt(0)=='#')return document.getElementById((id.charAt(0)=='#'?id.substr(1):id));
	return null;
}

js.main=function(cfg){
	if(!cfg)cfg={create:1,elements:1,fixImg:1};
	if(cfg.create)js.create.apply();
	if(cfg.elements)js.elements.apply();
	if(cfg.fixImg)if(js.navInfo()[0]=='ie'&&js.navInfo()[1]<=6)js.fixImg();
}

js.elements={
	apply:function(){
		this.datetime();
		this.href();
		this.cl(null,null,document.body);
	},
	inpk:0,
	datetime:function(m){
		var input=document.getElementsByTagName('input');
		if(input.length<=0)return;
		for(var j=0;j<input.length;j++){
			var t=js.get(input[j],'type');
			if(t=='time'){
				if(js.has(input[j],'sec')){
					this.inpk=1;
					input[j].value=js.date('hh:mm:ss');
				}else if(!m)input[j].value=js.date('t');
			}else if(t=='date'&&!m){
				input[j].value=js.date('s');
				input[j].onfocus=function(){this.select();}
				input[j].onkeydown=function(){return js.mask.dt(event,this,1);}
				input[j].onblur=function(){if(this.value=='')this.value=js.date('s');}
			}
		}
		if(this.inpk==1)setInterval(function(){js.elements(1);},1000);
	},
	href:function(){
		var b=document.body.getElementsByTagName('*');
		var base=document.getElementsByTagName('base')[0];
		for(var i=0;i<b.length;i++){
			var h=js.get(b[i],'href');
			if(h){
				if(h.indexOf('www')!=-1)js.set(b[i],'href','http://'+h);
				if(b[i].tagName!='A')b[i].onclick=function(){(base.target?base.target:window).location=js.get(this,'href');}
				b[i].style.cursor='pointer';
			}
		}
	},
	cl:function(o,s,obj){
		if(o&&s){
			o=o.push?o:[o];
			s=s.push?s:[s];
			for(var i=0;i<o.length;i++)js(o[i]).className=s[i];
		}else{
			var b=obj.getElementsByTagName('*');
			for(var i=0;e=b[i];i++){
				if(js.has(e,'jscl')){
					var ctt=js.get(e,'jscl');
					ctt=ctt.split(' ');
					
					for(var j=0;j<ctt.length;j++)if(ctt[j]&&ctt[j].charAt(0)=='$')ctt[j]=ctt[ctt[j].num()-1]?ctt[ctt[j].num()-1]:a;
					
					var classe=ctt[0]?ctt[0]:(e.className?e.className:'');
					var over=ctt[1]?ctt[1]:classe;
					var out=ctt[2]?ctt[2]:classe;
					var clic=ctt[3]?ctt[3]:classe;
					
					e.className=classe;
					
					js.set(e,'out',out);
					js.set(e,'over',over);
					js.set(e,'clic',clic);
					
					js.set(e,'onclick',js.fctt(e.onclick)+'this.className=this.getAttribute("clic");');
					js.set(e,'onmouseout',js.fctt(e.onmouseout)+'this.className=this.getAttribute("out");');
					js.set(e,'onmouseover',js.fctt(e.onmouseover)+'this.className=this.getAttribute("over");');
				}
			}
		}
	}
}

js.extend = function(){
	var t=this, i=0, f, k, v;
	if(arguments.length>1){
		i++;
		t=arguments[0];
	}
	for(var i; f=arguments[i];i++){
		for(var k in f){
			v=f[k];
			if(v&&v.slice)t[k]=t[k]&&t[k].slice?t[k].concat(v):[].concat(v);
			else if(v&&typeof v=='object')t[k]=js.extend(t[k]||{},v);
			else t[k]=v;
		}
	}
}

js.extend(String.prototype,{
			str:function(){
				return this.replace(/\d/g,'');
			},
			num:function(){
				var r=parseFloat(this.replace(/[^\.\-\d]/g,''));
				return isNaN(r)?0:r;
			},
			rp:function(re,rp){
				return this.replace(re,rp);
			},
			io:function(str){
				return this.indexOf(str);
			},
			lio:function(str){
				return this.lastIndexOf(str);
			},
			ioAt:function(str,pos){
				if(pos<=0)pos=1;
				var r=0;
				for(var i=0;i<this.length;i++){
					if(this.charAt(i)==str)r++;
					if(r==pos)return i;
				}return -1;
			},
			up:function(){return this.toUpperCase();},
			low:function(){return this.toLowerCase();},
			int:function(){
				return parseInt(this);
			},
			float:function(){
				return parseFloat(this);
			},
			trim:function(){
				return this.replace(/(\s*)(.+)(\s*)/g,'$2');
			},
			count:function(str){
				for(var r=i=0;i<this.length;i++)if(this.charAt(i)==str)r++;
				return r;
			},
			mirror:function(){
				return this.split('').reverse().join('');;
			},
			img:function(){
				return /\.(jpe?g|bmp|png|gif)$/.test(this.toLowerCase())?true:false;
			},
			email:function(){
				return /^[-_a-z0-9]+(\.[-_a-z0-9]+)*@([-a-z0-9]+\.)*([a-z]{2,4})$/.test(this.toLowerCase())?true:false;
			},
			sbs:function(start,end){
				if(start==null)return this;
				if(end==null)return this.substr(start);
				return this.substring(start,end<0?this.length+end:end);
			}
		  });

js.extend(Number.prototype,{
		  abs:function(){return Math.abs(this);},
		  ceil:function(){return Math.ceil(this);},
		  floor:function(){return Math.floor(this);},
		  round:function(){return Math.round(this);},
		  pow:function(n){return Math.pow(this,n);}
		  });

js.nlock=function(n){
	n=n.keyCode;
	if((n>=96&&n<=105)||(n>=48&&n<=57)||n==8||n==9||n==13)return true;
	return false;
}

js.sat=function(o,att){
	if(!o)return;
	o=js(o);
	for(var nome in att){
		var x='';
		switch(nome){
			case 'mh':	x='onmouseover'	;break;
			case 'mo':	x='onmouseout'	;break;
			case 'md':	x='onmousedown'	;break;
			case 'mu':	x='onmouseup'	;break;
			case 'mm':	x='onmousemove'	;break;
			case 'kd':	x='onkeydown'	;break;
			case 'kp':	x='onkeypress'	;break;
			case 'ku':	x='onkeyup'		;break;
			case 'ck':	x='onclick'		;break;
			case 'dc':	x='ondblclick'	;break;
			case 'fc':	x='onfocus'		;break;
			case 'bl':	x='onblur'		;break;
			case 'ch':	x='onchange'	;break;
			case 'cl':	x='className'	;break;
			default:	x=nome			;break;
		}
		o[x]=att[nome];
	}
}

js.has=function(o,str){
	try{
		return (js.navInfo()[0]!='ie'?(o.hasAttribute(str)?true:false):o.getAttribute(str)!=null&&(o.getAttribute(str)==''||o.getAttribute(str)!='')?true:false);
	}catch(e){return false;}
}

js.set=function(o,c,str){
	return o.setAttribute(c,str);
}

js.get=function(o,str){
	return js.has(o,str)?o.getAttribute(str):'';
}

js.removeChildren=function(o){
	if(!o||!o.childNodes.length)return false;
	o=js(o);
	for(var i=o.childNodes.length;i>=0;i--)if(o.childNodes[i]&&o.childNodes[i].nodeType==1)o.removeChild(o.childNodes[i]);
}

js.getNodes=function(o){
	o=js(o);
	var r=[];
	for(var i=0,e;e=o.childNodes[i++];)if(e.nodeType==1)r[r.length]=e;
	return r;
}

js.each=function(o,fn,r){
	if(!o)return;
	if(!fn)return;
	if(!o.slice&&!(typeof o=='object'&&'length' in o))o = [o];
	var i=0,v;
	for(;v=o[i];)if(fn.call(r||v,i++,v))break;
}

js.feach=function(o,fn,r){
	if(!o)return;
	if(!fn)return;
	var k,v,i=0;
	for(k in o)if(fn.call(r||[k],k,o[k],i++))break;
}

js.conv={
	toHex:function(rgb){
		var c=[parseInt(rgb[0]),parseInt(rgb[1]),parseInt(rgb[2])];
		var ret='';
		var aux=[0,0];
		var h='0123456789abcdef';
		for(var i=0;i<c.length;i++){
			do{	aux[0]=c[i]%16;
				aux[1]=(c[i]/16).floor();
				c[i]=(c[i]/16).floor();
			}while((c[i]/16)>=16)
			ret+=(h.charAt(aux[1])+h.charAt(aux[0]));
		}
		return ret;
	},
	fromHex:function(h){
		if(h.charAt(0)=='#')h=h.substr(1);
		var hex='0123456789abcdef';
		var ret=[0,0,0];
		for(var ct=i=r=0,g=[];i<h.length;i+=2){
			for(var j=0;j<hex.length;j++){
				if(h.charAt(i)==hex.charAt(j))g[0]=j;
				if(h.charAt(i+1)==hex.charAt(j))g[1]=j;
			}
			r=(g[0]*((16).pow(1)))+(g[1]*((16).pow(0)));
			ret[ct++]=r;
		}
		return ret;
	}
}

js.exist=function(id){
	var d=document.getElementsByTagName('*');
	var r=[false,''];
	for(var i=0;i<d.length;i++){
		if(js.get(d[i],'title')==id){r[0]=true;r[1]='t';break;}
		else if(js.get(d[i],'id')==id){r[0]=true;r[1]='i';break;}
		else if(js.get(d[i],'name')==id){r[0]=true;r[1]='n';break;}
	}
	return r;
}

js.fctt=function(f){
	if(!f)return '';
	var r=(f+'').substring((f+'').indexOf('{')+2,(f+'').lastIndexOf('}'));
	if(typeof f=='object'){
		r='';
		for(var i=0;t=f[i];i++){
			if(!t)t='';
			r+=(t+'').substring((t+'').indexOf('{')+1,(t+'').lastIndexOf('}'));
		}
	}
	return r;
}

js.navInfo=function(){
	var ret=['nt','',''];
	var a=navigator.appVersion;
	if(document.all)ret[0]='ie';
	else{
		var u=(navigator.userAgent).low();
		var nvs=['firefox','chrome','opera','safari'],cif=['ff','ch','op','sf'];
		for(var i=0;nvsn=nvs[i];i++)if(u.indexOf(nvsn)!=-1){ret[0]=cif[i];break;}
	}
	if(ret[0]=='ie')ret[1]=(a.substring(a.ioAt(';',1)+7,a.ioAt(';',2)));
	else ret[1]=(a.substr(0,a.indexOf('(')-1));
	ret[2]=(navigator.userLanguage?navigator.userLanguage:navigator.language).substr(0,2);
	return ret;
}

js.out=function(str,o,m){
	o?o=js(o):o=document.body;
	if(o!=document.body)m=0;
	switch(m){
		case 0:return o.innerHTML+=str;break;
		case 1:return alert(str);break;
		default:return document.write(str);break;
	}
}

js.date=function(f,a,m,d){
	if(!f&&!a)return false;
	if(!(f=='f'||f=='l'||f=='s'||f=='t'||f=='p'||f=='bsx')&&(f.replace(/^[YyMmDdAaHhsuiqw<>?!\(\)\{\}\[\]\/,\.:;%\s]+$/g,'')!=''))return false;
	if(f!='l'&&f!='s'){
		if(f=='t')f='h:m';
		f=f.replace(/(y)+/g,'y');
		f=f.replace(/(Y)+/g,'Y');
		f=f.replace(/(M)+/g,'M');
		f=f.replace(/(D)+/g,'D');
		f=f.replace(/(d)+/g,'d');
		f=f.replace(/(h)+/g,'h');
		f=f.replace(/(H)+/g,'H');
		f=f.replace(/(i)+/g,'i');
		f=f.replace(/(s)+/g,'s');
		f=f.replace(/(u)+/g,'u');
		f=f.replace(/(A)+/g,'A');
		f=f.replace(/(a)+/g,'a');
		f=f.replace(/(p)+/g,'p');
		f=f.replace(/(m)+/g,'m');
		f=f.replace(/(q)+/g,'q');
		f=f.replace(/(w)+/g,'w');
	}
	var d = (a&&m&&d)?new Date(a,m-1,d):new Date();
	var c = [d.getDay(),d.getDate(),d.getMonth(),d.getFullYear(),d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds()];
	var dias = ['Domingo','Segunda-Feira','Terça-Feira','Quarta-Feira','Quinta-Feira','Sexta-Feira','Sábado'];
	var meses = ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'];
	
	if(f=='w')return c[0];
	
	var bsx=c[3]%100==0&&c[3]%400!=0?false:c[3]%4==0&&c[3]%100!=0?true:c[3]%400==0?true:false;
	if(f=='bsx')return bsx;
	
	var tot_dias=(c[2]==1?(bsx?29:28):(c[2]<=6?(c[2]%2!=0?30:31):(c[2]%2==0?30:31)));
    if(f=='q')return tot_dias;
	
	var p='';
	if(c[4]<12)p='m';
	else if(c[4]>=12&&c[4]<18)p='t';
	else p='n';
	var r=[(dias[c[0]]+', '+c[1]+' de '+meses[c[2]]+' de '+c[3]),(c[1]+' de '+meses[c[2]]+' de '+c[3])];
	if(f=='f')return r[0];
	else if(f=='l')return r[1];
	else if(f=='s')return c[1]+'/'+(c[2]+1<10?'0'+(c[2]+1):(c[2]+1))+'/'+c[3];
	c[2]++;
	c[3]+='';
	var cmp='';
	if(f.count('A')>0)cmp=c[4]>12?'PM':'AM';
	else if(f.count('a')>0&&cmp=='')cmp=c[4]>12?'pm':'am';
	f=f.replace(/(d)/g,c[1]<10?'0'+c[1]:c[1]);
	f=f.replace(/(M)/g,c[2]<10?'0'+c[2]:c[2]);
	f=f.replace(/(y)/g,c[3]);
	f=f.replace(/(Y)/g,c[3].substr(2));
	f=f.replace(/(h)/g,c[4]<10?'0'+c[4]:c[4]);
	f=f.replace(/[HAa]/g,c[4]<12?c[4]:c[4]-12);
	f=f.replace(/(i)/g,c[5]<10?'0'+c[5]:c[5]);
	f=f.replace(/(s)/g,c[6]<10?'0'+c[6]:c[6]);
	f=f.replace(/(u)/g,c[7]);
	f=f.replace(/(p)/g,p);
	f=f.replace(/(D)/g,dias[c[0]]);
	f=f.replace(/(m)/g,meses[(c[2]-1)]);
	
	if(cmp!='')f+=(' '+cmp);
	return f;
}

js.slides=function(o,wElem,hElem,style){
	var _=this;
	_.o=js(o);
	if(!_.o)return;
	if(style<0||!style)style=0;
	if(style>3)style=3;
	_.st=style;
	var we=wElem;
	var isri=_.o.childNodes[0].className=='jsun-slides-parent-div'?1:0;
	
	var nElem=0;
	var onod=js.getNodes(isri?_.o.childNodes[0]:_.o);
	for(var i=0,e;e=onod[i++];){
		e.style.float='left';
		e.style.cssFloat='left';
		e.style.display='inline-block';
		nElem++;
	}
	
	if(!isri){
		var ctt=_.o.innerHTML;
		_.o.innerHTML='';
		
		_.o.style.overflow='hidden';
		_.o.style.width=wElem+'px';
		_.o.style.height=hElem+'px';
		_.o.style.position='relative';
		
		var div=document.createElement('div');
		div.style.padding='0px';
		div.style.margin='0px';
		div.style.width=(nElem*wElem)+'px';
		div.style.position='relative';
		div.style.left='0px';
		div.style.display='block';
		div.className='jsun-slides-parent-div';
		
		div.innerHTML=ctt;
		
		_.o.appendChild(div);
	}else _.o.childNodes[0].style.width=(nElem*wElem)+'px';
	
	var pga=1,lpg=1,v=0,varia=1;
	_.exec=0;
	_.time=null;
	_.allnodes=[];
	
	var ttt=js.getNodes(_.o.childNodes[0]);
	for(var i=0,e;e=ttt[i++];)_.allnodes[_.allnodes.length]=e;
	
	if(_.st>0&&_.st!=3){
		for(var el,i=0,c=0,zi=50*nElem;el=_.allnodes[i++];){
			if(c>0)el.style.display='none';
			else el.style.display='block';
			if(_.st==2){
				el.style.position='absolute';
				el.style.zIndex=zi;
				zi-=50;
			}
			c++;
		}
	}
	
	this.go=function(n){
		if(_.exec)return;
		n=n?n:1;
		var panel=_.o.childNodes[0];
		var actual=(panel.style.left.sbs(0,-2)).float();
		lpg=pga;
		pga=pga+n;
		
		if(pga<1)pga=nElem;
		if(pga>nElem)pga=1;
		
		varia=pga-lpg;
		_.run(actual.abs(),varia,pga,panel,we);
	}
	
	_.r=0;
	this.run=function(a,v,p,o,we){
		_.exec=1;
		if1=1;
		
		switch(_.st){
			case 0:
				var difi=((p-1)*we)*-1;
				var mt=new js.motion(o,{left:difi});
				_.exec=0;
				return;
			;break;
			
			case 1:
				if(!v){
					_.exec=0;
					return;
				}
				var node=0;
				for(var el,i=0,c=0;el=_.allnodes[i++];){
					//alert(el);
					if(p==++c)node=el;
					if(el.style.display=='block'){
						var liv=new js.liven(el);
						liv.fade(0,'block');
					}
				}
				setTimeout(function(){
					var liv=new js.liven(node);
					liv.fade(1,'block');
				},33);
				
				_.exec=0;
			;break;
			
			case 2:
				if(!v){
					_.exec=0;
					return;
				}
				var node=0;
				for(var el,i=0;el=_.allnodes[i++];){
					if(el.style.display=='block'){
						var lasts=[el.style.zIndex,_.allnodes[p-1].style.zIndex];
						el.style.zIndex=100;
						_.allnodes[p-1].style.zIndex=50;
						
						var liv=new js.liven(_.allnodes[p-1]);
						liv.timer(88).fade(1,'block');
						
						var liv2=new js.liven(el);
						liv2.timer(88).fade(0,'block');
						
						setTimeout(function(){
							el.style.zIndex=lasts[0];
							_.allnodes[p-1].style.zIndex=lasts[1];
						},500);
						break;
					}
				}
									
				_.exec=0;
				;break;
				
				
			case 3:
				var difi=((p-1)*(we+we/20).floor())*-1;
				var difr=((p-1)*we)*-1;
				
				if(difi==0){
					difi=(we/20).floor();
					difr=0;
				}
				
				var mt=new js.motion(o,{left:difi});
				setTimeout(function(){var mt=new js.motion(o,{left:difr});},900);
				_.exec=0;
				return;
			;break;
			}
	}
}

js.motion=function(o,att){
	var _=this;
	if(!o||!att)return;
	_.o=js(o);
	_.att=att;
	_.inter;
	
	_.exec=function(o,s,f){
		var os=o.style;
		var i=os[s].num();
		var u=os[s].str().rp(/\-/g,'');
		var d=f-i;
		
		if(d==0)return;
		
		_.inter=setInterval(function(){
			var r=d/4;
			d-=r;
			i+=r;
			o.style[s]=i+u;
			if(d.floor().abs()<=1||d.ceil().abs()==f.ceil()){
				o.style[s]=f+u;
				clearInterval(_.inter);
				return;
			}
		},33);
	}
	
	for(var s in _.att)_.exec(_.o,s,_.att[s]);
}

js.liven=function(o){
	this.elem=js(o);
	if(!this.elem)return;
	
	//CSS
	this.css=function(att){
		if(!att)return;
		var _=this;
		var o=_.elem;
		
		for(var k in att){
			/*if(/^(width|height|font-size)$/.test(k)){
				var news=att[k].num();
				var last=o.style[k]?o.style[k].num():o[k]?o[k].num():false;
			}*/
			o.style[k]=att[k];
		}
	}
	
	//Fade
	var fadeVars=[22,0.2];
	var disOb=[];
	this.timer=function(interval,relation){
		if(!interval)interval=33;
		if(!relation)relation=0.2;
		fadeVars=[interval,relation];
		return this;
	}
	this.fade=function(m,display){
		o=this.elem;
		var _=this;
		display=display?display:'inline-block';
		if(!o.id&&isNaN(arguments[0]))return -1;
		if(!o.style.opacity||o.style.opacity==''){
			o.style.opacity=(o.style.display=='none'?0:1);
			o.style.filter=(o.style.display=='none'?'alpha(opacity=0)':'alpha(opacity=100)');
			if(o.style.opacity==0)o.style.display=display;
		}
		var id=o.id;
		for(var i=0,k=-1;i<disOb.length;i++)if(disOb[i]['id']==id)k=i;
		
		if(k==-1){
			k=disOb.length;
			disOb[disOb.length++]={id:id,opa:parseInt(o.style.opacity)};
		}
		
		t=fadeVars[0];
		var r=fadeVars[1];
		
		if(m==null){
			if(disOb[k].opa>=1)m=0;
			else m=1;
		}
		disOb[k].opa+=(m==1?r:-r);
		o.style.opacity=disOb[k].opa;
		o.style.filter='alpha(opacity='+(disOb[k].opa*100)+')';
		if(m==0&&disOb[k].opa<=0){
			o.style.opacity='';
			o.style.display='none';
			disOb[k].opa=0;
			return 0;
		}else if(m==1&&disOb[k].opa>=1)return 0;
		else setTimeout(function(){_.fade(m,display);},t);
		return 1;

	}
}

js.fixImg=function(){
	var s;
	var a = ['id','alt','onmouseover','onmouseout','onmouseup','onmousemove','onmousedown','onclick','ondblclick','onkeypress','onkeyup','onkeydown','title','class','onload'];
	for(var i=0,img;img=document.images[i]; i++){
		s=document.createElement('span');
		for(var j=0,v; v=a[j]; j++){
			s[v]=img[v];
		}
		s.style.cssText=img.style.cssText;
		s.style.width=img.width;
		s.style.height=img.height;
		s.style.display='inline-block';
		s.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+img.src+'", sizingMethod="scale")';
		img.parentNode.replaceChild(s,img);
	}
}

js.imgMiddle=function(o,url){
	try{
		o=js(o);
		var img_aux=document.createElement('img');
		var at = [o.style.width.num(),o.style.height.num()];
		if(isNaN(at[0])){at[0]=300;o.style.width='300px';}
		if(isNaN(at[1])){at[1]=300;o.style.height='300px';}
	}catch(e){return false;}
	function loop(c){
		at[c]-=(c==0?(at[c]-img_aux.width):(at[c]-img_aux.height));
		at[c]-=30;
		for(var i=0;i<at[c];i++){
			if(at[c]%10==0)return at[c];
			at[c]--;
		}
	}
	if(typeof url=='object'){
		if(url[1]=='0'){
			if(o.style.background.charAt(0)!='#')url[0]=(o.style.background).substring((o.style.background).indexOf('(')+1,(o.style.background).lastIndexOf(')'));
			if(url[0]!=''){
				img_aux.src=url[0];
				if(at[0]>img.width)o.style.width=loop(0)+'px';
				if(at[1]>img.height)o.style.height=loop(1)+'px';
				o.style.backgroundPosition=((img_aux.width-at[0])/2)*-1+'px '+
				((img_aux.height-at[1])/2)*-1+'px';
			}
			return;
		}
	}else{
		if(o.style.background.charAt(0)=='#')return;
		img_aux.src=(url+'');
		if(at[0]>img_aux.width)o.style.width=loop(0)+'px';
		if(at[1]>img_aux.height)o.style.height=loop(1)+'px';
		o.style.backgroundPosition=((img_aux.width-at[0])/2)*-1+'px '+
		((img_aux.height-at[1])/2)*-1+'px';
		return;
	}
}

var slideVar=new Array();
var slideVarI=0;
js.imgSlide=function(o,m){
	if(!o||!o.id||!o.style.background)return;
	o = js(o);

	
	var key=[0,0];
	for(var i=0;i<slideVar.length;i++){
		if(slideVar[i]['id']==o.id){
			key[0]=1;
			key[1]=i;
		}
	}
	
	var url=['',''];
	if(key[0]==1)url=[(slideVar[key[1]]['url'][0]),(slideVar[key[1]]['url'][1])];
	else url=['','0'];
	
	if(!o.style.width)o.style.width='300px';
	if(!o.style.height)o.style.height='300px';
	if(!o.style.backgroundPosition||o.style.backgroundPosition.split('px').length==1)o.style.backgroundPosition='0px 0px';
	o.style.cursor='crosshair';
		
	js.imgMiddle(o,url);
	
	var aux=[o.style.width.num(),o.style.height.num(),o.style.backgroundPosition.split('px'),o.id];
	
	if(key[0]==0){
			slideVar[slideVarI++]={id:aux[3],
			p:[(aux[2][0].trim().float()),(aux[2][1].trim().float())],
			mp:[(aux[2][0].trim().float()).abs()*2,(aux[2][1].trim().float()).abs()*2],
			r:[(aux[2][0].trim().float()).abs()/(aux[0]/2).ceil()*2,(aux[2][1].trim().float()).abs()/(aux[1]/2).ceil()],
			time:null,
			last:[0,0],
			url:['','1']};}
	
	o.onmousemove=function(){js.imgSlide(o);}
	o.onmouseup=function(){clearTimeout(slideVar[key[1]]['time']);o.onmousemove=null;}
	o.onmouseout=function(){clearTimeout(slideVar[key[1]]['time']);o.onmousemove=null;}

	if(!m)var m = [event.offsetX,event.offsetY,aux[0]/2,aux[1]/2];
	
	if(m[0]>m[2]&&slideVar[key[1]]['last'][0]<=m[0]){//direita
		if((slideVar[key[1]]['p'][0]-slideVar[key[1]]['r'][0])<=(slideVar[key[1]]['mp'][0]*-1))return;
		else{
			slideVar[key[1]]['p'][0]-=slideVar[key[1]]['r'][0];
			o.style.backgroundPosition=slideVar[key[1]]['p'][0]+'px '+slideVar[key[1]]['p'][1]+'px';
			clearTimeout(slideVar[key[1]]['time']);
			slideVar[key[1]]['time']=setTimeout(function(){js.imgSlide(o,m);},33);
		}
	}
	
	else if(m[0]<m[2]&&slideVar[key[1]]['last'][0]<=m[0]){//esquerda
		if((slideVar[key[1]]['p'][0]+slideVar[key[1]]['r'][0])>=0)return;
		else{
			slideVar[key[1]]['p'][0]+=slideVar[key[1]]['r'][0];
			o.style.backgroundPosition=slideVar[key[1]]['p'][0]+'px '+slideVar[key[1]]['p'][1]+'px';
			clearTimeout(slideVar[key[1]]['time']);
			slideVar[key[1]]['time']=setTimeout(function(){js.imgSlide(o,m);},33);
		}
	}
	
	if(m[1]>m[3]&&slideVar[key[1]]['last'][1]<=m[1]){//baixo
		if((slideVar[key[1]]['p'][1]-slideVar[key[1]]['r'][1])<=(slideVar[key[1]]['mp'][1]*-1))return;
		else{
			slideVar[key[1]]['p'][1]-=slideVar[key[1]]['r'][1];
			o.style.backgroundPosition=slideVar[key[1]]['p'][0]+'px '+slideVar[key[1]]['p'][1]+'px';
			clearTimeout(slideVar[key[1]]['time']);
			slideVar[key[1]]['time']=setTimeout(function(){js.imgSlide(o,m);},33);
		}
	}
	
	else if(m[1]<m[3]&&slideVar[key[1]]['last'][1]>=m[1]){//cima
		if((slideVar[key[1]]['p'][1]+slideVar[key[1]]['r'][1])>=0)return;
		else{
			slideVar[key[1]]['p'][1]+=slideVar[key[1]]['r'][1];
			o.style.backgroundPosition=slideVar[key[1]]['p'][0]+'px '+slideVar[key[1]]['p'][1]+'px';
			clearTimeout(slideVar[key[1]]['time']);
			slideVar[key[1]]['time']=setTimeout(function(){js.imgSlide(o,m);},33);
		}
	}
	
	slideVar[key[1]]['last'][0]=m[0];
	slideVar[key[1]]['last'][1]=m[1];
}

js.mask={
	tel:function(k,obj){
		len=js(obj).value.length;
		if(js(obj).maxlength=!14)js(obj).maxlength=14;
		k=k.keyCode;
		if(k.isValid()){
			if(len==0)obj.value='(';
			else if(len==1&&obj.value.charAt('0')!='(')obj.value='('+obj.value;
			else if(len==3&&k!=8)obj.value+=') ';
			else if(len==9&&k!=8)obj.value+='-';
		}else return false;
	},
	rg:function(k,obj){
		var len=js(obj).value.length;
		k=k.keyCode;
		js(obj).maxlength='12';
		if(k.isValid()){
			if((len==2||len==6)&&k!=8)obj.value+='.';
			else if(len==10&&k!=8)obj.value+='-';
		}else return false;
	},
	cpf:{
		v:function(){},
		m:function(k,obj){
			var len = js(obj).value.length;
			js(obj).maxlength='14';
			k=k.keyCode;
			if(k.isValid()){
				if((len==3||len==7)&&k!=8)obj.value+='.';
				else if(len==11&&k!=8)obj.value+='-';
			}else return false;
		}
	},
	dt:function(k,obj,y){
		var len = js(obj).value.length;
		k=k.keyCode;
		y=y?y:0;
		y==1?y=10:y=5;
		js(obj).maxlength=y+'';
		if(k.isValid()){
			if(k==8||k==9||k.isValid()){
				if((len==2||(len==5&&y==10))&&k!=8)obj.value+='/';
			}else return false;
		}else return false;
	},
	cnpj:function(){
	},
	cep:function(){
	},
	money:function(obj){
		obj=js(obj);
		if(js.get(obj,'money')==obj.value)return;
		obj.value.replace(/^\D+$/g,'');
		for(var i=obj.value.length,c=0,aux='';i>=0;i--){
			c++;
			aux+=obj.value.charAt(i);
			if(i==obj.value.length-2&&obj.value.indexOf(',')==-1){
				aux+=',';
				c=0;
			}
			if(i<obj.value.length-2&&c%3==0&&i>0)aux+='.';
		}
		js.set(obj,'money',aux.mirror());
		obj.value=aux.mirror();
		return aux.mirror();
	}
}

js.move=function(opt){
	if(!opt)opt={dc:1,center:1};
	this.obp={x:0,y:0,ol:0,ot:0}
	this.ea=null;
	this.od=this.ou=function(){};
	var _=this;
	
	document.onmouseup=function(){
		_.ou();
		_.ea=null;
		document.onmousemove=function(){};
	}
	
	var nl=function(event){
		event=event||window.event;
		_.od(event);
		if(_.ea){
			_.el.d(event);
			if(_.ea.style.position!='absolute')_.ea.style.position='absolute';
			document.onmousemove=function(event){_.el.m(event)};
		}
	}
	
	document.onmousedown=nl;
	if(opt.dc)document.ondblclick=nl;
	
	this.el={
		d:function(event){
			if(event.which==1||event.button==1){
				event=event||window.event;
				_.obp.x=event.clientX;
				_.obp.y=event.clientY;
				_.obp.ol=_.ea.offsetLeft;
				_.obp.ot=_.ea.offsetTop;
			}
		},
		m:function(event){
			event=event||window.event;
			if(event.which==1||event.button==1){
				var p=[event.clientX,event.clientY];
				_.ea.style.left=_.obp.ol+(p[0]-_.obp.x)+'px';
				_.ea.style.top=_.obp.ot+(p[1]-_.obp.y)+'px';
			}
		}
	}
	return this;
}

js.create={
	apply:function(){
		var base=document.getElementsByTagName('base');
		for(var j=0;bt=base[j];j++){
			var len=this.common.jswin_themes.length;
			if(js.get(bt,'jswin')=='')this.common.jswin_themes[len++]={
				theme:js.get(bt,'theme'),
				alpha:js.get(bt,'alpha'),
				bgc:js.get(bt,'bgc'),
				bgi:js.get(bt,'bgi'),
				title:js.get(bt,'title'),
				width:js.get(bt,'width'),
				hide:js.get(bt,'hide'),
				pos:js.get(bt,'pos'),
				style:js.get(bt,'style')
				};
		}
		
		var b=document.getElementsByTagName('div');
		for(var i=b.length-1;i>=0;i--){
			var ob=b[i];
			if(js.has(ob,'jswin')){
				this.common.showWindows(ob);
				ob.parentNode.removeChild(ob);
			}else if(js.has(ob,'jsbar')){
				this.common.showBar(ob);
				ob.parentNode.removeChild(ob);
			}else if(js.has(ob,'jslabel'))this.common.showLabel(ob);
			else if(js.has(ob,'jscode'))this.common.showCode(ob);
		}
	},
	ci:[0,0],
	//st=[menu,ul,li,over,onclick]
	bar:function(c,li,st){
		if(!c)return false;
		var colors=[c.low(),'#','#','#'];
		var sq='0123456789abcdef';
		for(var i=1;i<colors[0].length;i++){
			var aux=0;
			for(var j=0;j<sq.length;j++)if(colors[0].charAt(i)==sq.charAt(j))aux=j;
		
			colors[1]+=(i%2!=0?sq.charAt((aux-6<0?aux+(aux-6).abs():aux-6).abs()):sq.charAt((aux+3>15?aux-(aux-15):aux+3).abs()));
			colors[2]+=(i%2!=0?sq.charAt((aux+1>15?aux-(aux-15):aux+1).abs()):sq.charAt((aux-3<0?aux+(aux-3).abs():aux-3).abs()));
			colors[3]+=(i%2!=0?sq.charAt((aux+5>15?aux-(aux-15):aux+5).abs()):sq.charAt((aux-8<0?aux+(aux-8).abs():aux-8).abs()));
		}
		
		if(!st)st=['','','','',''];
		else for(var i=0;i<5;i++)if(!st[i])st[i]='';
		
		var div=document.createElement('div');
		div.onselectstart=function(){return false;}
		div.className='jsbar';
		var ul=document.createElement('ul');
		var rep='\<li onmouseover="this.style.background=\''+colors[2]+'\'"';
		rep+=' onmouseout="this.style.background=\'\'"';
		rep+=' onclick="this.style.background=\''+colors[3]+'\'"';
		rep+=' style="color: '+colors[1]+';"';
		li=li.replace(/\<li/g,rep);
		ul.innerHTML=li;
		div.appendChild(ul);
		document.body.appendChild(div);
		c[0]++;
	},
	//ctt[title,ctt]
	win:function(ctt,bg,size,opa,pid,hide,pos,style){
		if(!ctt)return;
		bg[0]?bg[0]:bg[0]='#cccccc';
		if(bg[0]=='null')bg[0]='';
		bg[1]?bg[1]:bg[1]='';
		if(bg[0]!=''){
			var aux=bg[0];
			if(bg[0].charAt(0)=='#'&&bg[0].indexOf(',')==-1){
				aux='';
				bg[0]=bg[0].substr(1);
				if(bg[0].length==3){
					for(i=0;i<3;i++)aux+=bg[0].charAt(i)+bg[0].charAt(i);
					bg[0]=aux;
				}
				aux='';
				aux=js.conv.fromHex(bg[0].charAt(0)+bg[0].charAt(1))+',';
				aux+=js.conv.fromHex(bg[0].charAt(2)+bg[0].charAt(3))+',';
				aux+=js.conv.fromHex(bg[0].charAt(4)+bg[0].charAt(5))+'';
			}
			bg[0]=aux;
		}
		var img=bg[1];

		img=img.split(' ');
		if(!img[1])img[1]=''
		if(!img[2])img[2]='';
		
		if(img[1].indexOf('px')==-1)img[1]+='px';
		if(img[2].indexOf('px')==-1)img[2]+='px';
		var bgp=img[1]+' '+img[2];
		
		if(/\.(png|bmp|jpe?g|png|gif)/.test(bg[1])&&bg[1]!='')bg[1]='url('+img[0]+')';
		
		if(!size)size=['400','400'];
		for(i=0;i<2;i++)if(!size[i])size[i]='400';
		if(!opa)opa=1;
		opa=parseFloat(opa);
		if(opa<=100&&opa>1)opa/=100;
		if(!pos)pos='0 0';
		pos=pos.split(' ');
		if(pos[0]=='auto')pos[0]=((screen.height-(size[1].int()+51))/4);
		if(pos[0].indexOf('px')==-1)pos[0]+='px';
		if(pos[1]=='auto')pos[1]=((screen.width-(size[0].int()+18))/2);
		if(pos[1].indexOf('px')==-1)pos[1]+='px';
		var display=1;
		if(hide=='')hide='none';
		else hide='block';
		
		var global=document.createElement('div');
		global.className='jswin_global';
		js.set(global,'style','background-image:'+bg[1]+';background-position:'+bgp+';width:'+size[0]+'px;display:'+hide+';top:'+pos[1]+';left:'+pos[0]+';'/*+'filter="alpha(opacity='+(opa*100)+')"'*/);
		global.id=!pid?'js_wind_window_'+this.ci[1]:pid;
		
		if(bg[0]!=''){
			global.style.backgroundColor='rgb('+bg[0]+')';
			if(js.navInfo()[0]!='ie')global.style.backgroundColor='rgba('+bg[0]+','+opa+')';
		}
		
		if(bg[1]!=''){
			global.style.opacity=opa;
			global.style.filter='alpha(opacity='+(opa*100)+')';
		}else{
			global.style.opacity=1;
			global.style.filter='alpha(opacity=100)';
		}
		
		var content=document.createElement('div');
		js.set(content,'style',style);
		content.className='jswin_content';
		content.id='js_wind_ctt_'+this.ci[1];
		this.common.slidevar[this.common.slideI++]={id:'js_wind_ctt_'+this.ci[1],w:0,h:0,l:0,k:0,off:false};
		typeof ctt[1]=='object'?content.appendChild(ctt[1]):content.innerHTML+=ctt[1];
		var head=document.createElement('div');
		head.id='head';
		head.className='jswin_head';
		head.onselectstart=function(){return false;}
		head.onmouseover=function(){this.style.cursor='move';}
		head.onmouseout=function(){this.style.cursor='default';}
		head.onmousedown=head.ondblclick=function(){
			js.move.d(event);
			var b=document.getElementsByTagName('*');
			var zi=z=0;
			for(i=0; i<b.length; i++){
				z=b[i].style.zIndex;
				if(z>zi)zi=z;
			}
			this.parentNode.style.zIndex=zi+1;
		}
		
		var title=document.createElement('span');
		if(ctt[0]){
			title.innerHTML='▼'+ctt[0];
			title.style.cursor='pointer';
			title.onclick=function(){js.create.common.slide(this);}
		}
		var x=document.createElement('span');
		x.innerHTML='X';
		js.set(x,'style','float: right;cursor: pointer;');
		if(js.navInfo()[0]=='ie'){
			x.style.position='absolute';
			x.style.right='8px';
			x.style.top='0';
			x.style.float='';
		}
		
		var rrs=document.createElement('div');
		rrs.className='jswin_rslr';
		rrs.style.right='0';
		rrs.onmousedown=function(){
			var g=this.parentNode;
			document.onmousemove=function(){
				var l=(g.offsetWidth+(event.clientX-g.offsetWidth));
				g.style.width=(l>80?l:80)+'px';
			}
			document.onmouseup=function(){
				document.onmousemove=null;
			}
		}
		
		var lrs=document.createElement('div');
		lrs.className='jswin_rslr';
		lrs.style.left='0';
		lrs.onmousedown=function(){
			var g=this.parentNode;
			g.style.right=g.offsetRight+'px';
			document.onmousemove=function(){
				var l=(g.offsetWidth+(g.offsetWidth-event.clientX));
				g.style.width=(l>80?l:80)+'px';
			}
			document.onmouseup=function(){
				document.onmousemove=null;
			}
		}
		
		
		x.onclick=function(){js.dis(this.parentNode.parentNode,0);}
		head.appendChild(title);
		head.appendChild(x);
		global.appendChild(head);
		global.appendChild(content);
		document.body.appendChild(global);
		
		lrs.style.height=(global.offsetHeight-50)+'px';
		rrs.style.height=(global.offsetHeight-50)+'px';
		
		global.appendChild(lrs);
		global.appendChild(rrs);
		
		this.ci[1]++;

	},
	label:function(o){
		if(!o.id||!js.get(o,'for'))return false;
		var trg=js(js.get(o,'for'));
		if(!trg)return false;
		o.style.zIndex=3000;
		o.style.position='absolute';
		o.style.display='none';
		js.set(trg,'labelob',o.id);
		var over=function(event){
			event=event||window.event;
			var o=js(js.get(this,'labelob'));
			var ho=js.has(o,'honly');
			if(!ho)var t=event.clientY>(screen.availHeight/2)?-1*(o.offsetHeight+15):15;
			var l=event.clientX>(screen.availWidth/2)?-1*(o.offsetWidth+15):15;
			if(!ho)o.style.top=(event.clientY+t)+'px';
			else o.style.top=o.offsetHeight+'px';
			o.style.left=(event.clientX+l)+'px';
			o.style.display='block';
		}
		var move=function(event){
			var ho=js.has(o,'honly');
			event=event||window.event;
			var o=js(js.get(this,'labelob'));
			var ho=js.has(o,'honly');
			if(!ho)var t=event.clientY>(screen.availHeight/2)?-(o.offsetHeight+15):15;
			var l=event.clientX>(screen.availWidth/2)?-(o.offsetWidth+15):15;
			if(!ho)o.style.top=(event.clientY+t+(js.navInfo()[0]=='ch'?document.body.scrollTop:document.documentElement.scrollTop))+'px';
			else o.style.top=((this.offsetHeight/2)+(js.navInfo()[0]=='ch'?document.body.scrollTop:document.documentElement.scrollTop))+'px';
			o.style.left=(event.clientX+l)+'px';
		}
		var out=function(){
			js(js.get(this,'labelob')).style.display='none';
		}
		trg.onmouseover=over;
		trg.onmouseout=out;
		trg.onmousemove=move;
	},
	code:function(o,l){
		o.className='jscode';
		tx=o.innerHTML;
		tx=tx.replace(/&/g,'&amp;');
		tx=tx.replace(/</g,'&lt;');
		tx=tx.replace(/>/g,'&gt;');
		tx=tx.replace(/	/g,'&nbsp;&nbsp;&nbsp;&nbsp;');
		
		var lang=['js','html','java'];

		var js=[ 
				[/(:|=)/g,'<span class="jscode_str">$1</span>'],
				[/(\/[^\/>]+\/[^\/\\])(.*)/g,'<span class="jscode_re">$1</span>$2'],
				[/(\d)/g,'<span class="jscode_num">$1</span>'],
				[RegExp('([^\w])?(set(Interval|Timeout)|resize(By|To)|isNaN|getSelection|eval|(un)?escape|Date|(de|en)codeURI(Component)?|RegExp|Boolean|Array|String|Number|Object|Math|abs|floor|ceil|max|min|round|sqrt|pow|acos|asin|a?tan2?|E|PI|random|exp|log|replace|charAt|split|slice|substr(ing)?|(i|lastI)ndexOf|parse(Int|Float)?)([^\w])','g'),'$1<span class="jscode_fct">$2</span>$11'],
				[RegExp('([^\w])(stop|scroll(By|To)?|open|navigator|move(By|To)|home|forward|find|focus|clear(Interval|Timeout)|captureEvents|close|confirm|prompt|alert|blur|screen|back|event|document|window|([^<]body[^(\s*)?\/?>]))','g'),'$1<span class="jscode_ppt">$2</span>'],
				[/('[^']*')/g,'<span class="jscode_str">$1</span>'],
				[/("[^"]*")[^>]$/g,'<span class="jscode_str">$1</span>'],
				[/(function)/g,'<span class="jscode_bld">$1</span>'],
				[/(\(|\)|\{|\}|\[|\])/g,'<span class="jscode_res">$1</span>'],
[/([^\w])(instanceof|var|for|break|if|else|typeof|this|new|in|try|catch|throw|with|void|delete)([^\w])/g,'$1<span class="jscode_res">$2</span>$3'],
				[/\/\/(.*)(\n|\r\n)(.*)/g,'<br/><span class="jscode_cmt">//$1$2</span><br/>$3'],
				[/\/\*(.*|\n*|\r\n*)\*\//g,'<span class="jscode_doc">/*$1*/</span>'],
				[/(@(param|ret|author))/g,'<span class="bld_doc">$1</span>'],
				];
		
		
		var html=[ [/:/,'<span style="color: #0000ff;">:</span>'],
				 [],
				];
		
		var java=[ [/:/,'<span style="color: #0000ff;">:</span>'],
				 [],
				];
		
		var re=[js,html,java];
		
		for(var i=0;i<lang.length;i++)if(l==lang[i]){l=i;break;}
		
		for(var i=0;el=re[l][i];i++)tx=tx.replace(el[0],el[1]);
		
		if(document.all)tx=tx.replace(/\r\n/g,'<br/><br/>');
		else tx=tx.replace(/\n/g,'<br/><br/>');
		tx=tx.substr(tx.charAt(0)=='<'?5:0);
		o.innerHTML=tx;
		
	},
	common:{
		showCode:function(div){
			js.create.code(div,div.js.get('language'));
		},
		showLabel:function(div){
			js.create.label(div);
		},
		showBar:function(div){
			js.create.bar(div.js.get('color'),div.innerHTML);
		},
		pn:function(id){
			var cn=document.getElementsByTagName('div');
			for(var i=0,e;e=cn[i++];){
				if(js.has(e,'jsslide')&&e.js.has(e,'id')&&e.id==id){
					var n=e.getElementsByTagName('div');
					for(var j=0,s;s=n[j++];)if(js.has(s,'jspanel')){
						var imgs=s.getElementsByTagName('ul')[0];
						for(var r=0,m;m=imgs.childNodes[r];r++){
							if(m&&(m.nodeType==1&&m.style.float!='left'))m.style.float='left';
						}
						return s;
					}
				}
			}
		},
		t:null,
		goto:function(o,w,q){
			q=q?q:33;
			js.create.common.t=setInterval(function(){
					
					e.style.position=tw;
			},q);
		},
		jswin_themes:new Array(),
		showWindows:function(div){
			jan=div;
			var atb=['','','','','','1','',''];
			if(js.has(jan,'theme')){
				for(j=0;plus=this.jswin_themes[j];j++){
					if(plus.theme==js.get(jan,'theme'))atb=[plus.title,plus.bgc,plus.bgi,plus.width,plus.alpha,plus.hide,plus.pos,plus.style];
				}
			}
			
			js.create.win(
						  [js.get(jan,'title')?js.get(jan,'title'):atb[0],jan.innerHTML],
						  [js.get(jan,'bgc')?js.get(jan,'bgc'):atb[1],js.get(jan,'bgi')?js.get(jan,'bgi'):atb[2]],
						  [js.get(jan,'width')?js.get(jan,'width'):atb[3],js.get(jan,'height')],
						  js.get(jan,'alpha')?js.get(jan,'alpha'):atb[4],
						  js.get(jan,'id'),
						  js.has(jan,'hide')?'':atb[5],
						  js.get(jan,'pos')?js.get(jan,'pos'):atb[6],
						  atb[7]+';'+(js.has(jan,'style')?js.get(jan,'style'):'')
						  );
			
		},
		slidevar:new Array(),
		slideI:0,
		slide:function(o){
			o=js(o);
			var t=o.innerHTML;
			var ctt=js(o).parentNode.parentNode.childNodes[1];
			for(i=0;i<this.slideI;i++)if(ctt.id==this.slidevar[i].id)if(!this.slidevar[i].off){
				this.slidevar[i].h=ctt.offsetHeight;
				this.slidevar[i].l=ctt.offsetHeight+5;
				this.slidevar[i].off=true;
				this.slidevar[i].w=ctt.offsetWidth;
			}
			var k=-1;
			for(i=0;i<this.slideI;i++)if(ctt.id==this.slidevar[i].id)k=i;
			js(o).innerHTML=(this.slidevar[k].k==0?'►':'▼')+t.substr(1);
			if(this.slidevar[k].k==0){
				if(this.slidevar[k].h<=50)js.dis(ctt,0);
				setTimeout(function(){
						js.create.common.slidevar[k].h-=3.1;
						ctt.style.height=js.create.common.slidevar[k].h+'px';
						if(js.create.common.slidevar[k].h<=0)js.create.common.slidevar[k].k=1;
						else js.create.common.slide(o,t);
				},11);
			}else{
				ctt.style.width=this.slidevar[k].w-13+'px';
				if(js.create.common.slidevar[k].h>=50)js.dis(ctt,1);
				setTimeout(function(){
						js.create.common.slidevar[k].h+=3.1;
						ctt.style.height=js.create.common.slidevar[k].h+'px';
						if(js.create.common.slidevar[k].h>=js.create.common.slidevar[k].l)js.create.common.slidevar[k].k=0;
						else js.create.common.slide(o,t);
				},11);
			}
		}
	}
}
