/*
var cmpt = 0;
function slide(inc) {
	
	if(cmpt >= 2334)
	{cmpt = 0;
	cmpt +=inc}
	else
	{cmpt += inc;}
	//alert('cmpt : '+ cmpt);
	var margin_left =  - cmpt + 'px';
	
	
	document.getElementById('slideAll').style.marginLeft = margin_left;
	setTimeout("slide(778)",5000);
}*/


//Fonction de changement d'onglets
function multiClass(eltId) {
	arrLinkId = new Array('_0','_1','_2','_3','_4');
	intNbLinkElt = new Number(arrLinkId.length);
	arrClassLink = new Array('current','ghost');
	strContent = new String()
	for (i=0; i<intNbLinkElt; i++) {
		strContent = "menu"+arrLinkId[i];
		if ( arrLinkId[i] == eltId ) {
			document.getElementById(arrLinkId[i]).className = arrClassLink[0];
			document.getElementById(strContent).className = 'on content';
		} else {
			document.getElementById(arrLinkId[i]).className = arrClassLink[1];
			document.getElementById(strContent).className = 'off content';
		}
	}	
}
/*//////////////////////////////////////////////////////////////////////////////////////////////////////*/
//pour les photo avec page
//affiche la div transparente
function hideDiv(ID) { 
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById(ID).style.visibility = 'hidden';
	}else { 
		if (document.layers) { // Netscape 4 
			document.hideshow.visibility = 'hidden'; 
		}else { // IE 4 
			document.all.hideshow.style.visibility = 'hidden'; 
		} 
	} 
}
//cache la div transparente
function showDiv(ID) { 
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById(ID).style.visibility = 'visible';  
	}else { 
		if (document.layers) { // Netscape 4 
			document.hideshow.visibility = 'visible'; 
		} else { // IE 4 
			document.all.hideshow.style.visibility = 'visible'; 
		} 
	} 
} 
/*//////////////////////////////////////////////////////////////////////////////////////////////////////*/
// popup simple 
//affiche la div transparente
function hideDiv_popup(ID) { 
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById('hideshow'+ID).style.visibility = 'hidden'; 
	}else { 
		if (document.layers) { // Netscape 4 
			document.hideshow.visibility = 'hidden'; 
		}else { // IE 4 
			document.all.hideshow.style.visibility = 'hidden'; 
		} 
	} 
}
//cache la div transparente
function showDiv_popup(ID) { 
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById('hideshow'+ID).style.visibility = 'visible'; 
	}else { 
		if (document.layers) { // Netscape 4 
			document.hideshow.visibility = 'visible'; 
		} else { // IE 4 
			document.all.hideshow.style.visibility = 'visible'; 
		} 
	} 
} 
function addLoadEvent(func) 
{ 
   var oldonload = window.onload; 
   if(typeof window.onload != 'function') 
   { 
      window.onload = func; 
   } 
   else 
   { 
      window.onload = function() 
      { 
         oldonload(); 
         func(); 
      } 
   } 
}
var diapo_photo = {
	 diapo1:function (slideshowA0){
			slideshowA0.auto=true;
			slideshowA0.speed=5;
			slideshowA0.info='informationA0';
			slideshowA0.thumbs='sliderA0';
			slideshowA0.left='slideleftA0';
			slideshowA0.right='sliderightA0';
			slideshowA0.scrollSpeed=4;
			slideshowA0.spacing=5;
			slideshowA0.active='#fff';
			slideshowA0.init('slideshowA0','imageA0','imgprevA0','imgnextA0','imglinkA0');
	},

	diapo2:function (slideshowA1){
			slideshowA1.auto=true;
			slideshowA1.speed=5;
			slideshowA1.info='informationA1';
			slideshowA1.thumbs='sliderA1';
			slideshowA1.left='slideleftA1';
			slideshowA1.right='sliderightA1';
			slideshowA1.scrollSpeed=4;
			slideshowA1.spacing=5;
			slideshowA1.active='#fff';
			slideshowA1.init('slideshowA1','imageA1','imgprevA1','imgnextA1','imglinkA1');
	}
};
/* requete asynchrone charge musique corespondant au cover */ 
function pageSuivante(valeurCour,valeurPrec,valeurSuiv,nbPage,position)
{

aleatoire = Math.random();

var xhr_object = null;

if(window.XMLHttpRequest) // Firefox
xhr_object = new XMLHttpRequest();
else if(window.ActiveXObject) // Internet Explorer
xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
else { // XMLHttpRequest non supporté par le navigateur
alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
return;
}


var method = "GET";
var filename = "requeteAsynchrone.php?a="+aleatoire+"&v_c="+valeurCour+"&v_p="+valeurPrec+"&v_s="+valeurSuiv+"&nb="+nbPage+"&p="+position+"&nav=1"; // on l'envois au fichier php pour traitement


xhr_object.open(method, filename, true);

xhr_object.onreadystatechange = function() {

if(xhr_object.readyState == 1) {
document.getElementById("change").innerHTML = "<img style='margin-left:50%;margin-right:50%;' src='Image/loading.gif' />";
}

if(xhr_object.readyState == 4) {
var tmp = xhr_object.responseText;
document.getElementById("change").innerHTML = tmp; // on affiche le resultat renvoyé par le fichier php
}
}


xhr_object.send(null);

}

/* requet asynchrone charge musique corespondant au cover */ 
function pagePrecedente(valeurCour,valeurPrec,valeurSuiv,nbPage,position)
{

aleatoire = Math.random();

var xhr_object = null;

if(window.XMLHttpRequest) // Firefox
xhr_object = new XMLHttpRequest();
else if(window.ActiveXObject) // Internet Explorer
xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
else { // XMLHttpRequest non supporté par le navigateur
alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
return;
}


var method = "GET";
var filename = "requeteAsynchrone.php?a="+aleatoire+"&v_c="+valeurCour+"&v_p="+valeurPrec+"&v_s="+valeurSuiv+"&nb="+nbPage+"&p="+position+"&nav=-1"; // on l'envois au fichier php pour traitement


xhr_object.open(method, filename, true);

xhr_object.onreadystatechange = function() {

if(xhr_object.readyState == 1) {
document.getElementById("change").innerHTML = "<img style='margin-left:50%;margin-right:50%;' src='Image/loading.gif' />";
}

if(xhr_object.readyState == 4) {
var tmp = xhr_object.responseText;
document.getElementById("change").innerHTML = tmp; // on affiche le resultat renvoyé par le fichier php
}
}


xhr_object.send(null);

}


// Correctif de l'affichage des images PNG dans IE5.5 et IE6 (transparent pour les autres navigateurs).
// V1.1 par Brice de Villeneuve, http://www.boursica.com/
// Licence : freeware, librement utilisable du moment que vous laissez ces commentaires dans votre source.
// Mettre ce script dans le head et dans les balises IMG ajouter simplement : onload='setpng(this)'
// Si l'image n'est pas visible (display:none par exemple), appeler la fonction juste après l'affichage de l'image
// dans un javascript avec, par exemple, un setpng(document.getElementById('idDeMonImage');
function setpng(img) { if(document.all && (IEver=parseFloat(navigator.appVersion.split("MSIE")[1])) && (IEver>=5.5) && (IEver<7) && document.body.filters && img) {
	imgName=img.src.toUpperCase();
	if(imgName.substring(imgName.length-3,imgName.length)=="PNG") img.outerHTML=
		"<span "+(img.id?"id='"+img.id+"' ":"")+(img.className?"class='"+img.className+"' ":"")+(img.title?"title=\""+img.title+"\" ":"")
		+"style=\"width:"+img.width+"px;height:"+img.height+"px;"+(img.align=="left"?"float:left;":(img.align=="right"?"float:right;":""))
		+(img.parentElement.href?"cursor:hand;":"")+"display:inline-block;"+img.style.cssText+";"
		+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img.src+"',sizingMethod='scale');\"></span>";
}}

function afficheId(baliseId)
{
	document.getElementById(baliseId).style.visibility='visible';
    document.getElementById(baliseId).style.display='block';	
}
//script pour cacher une photo lors du rolover 
function cacheId(baliseId)
{
	document.getElementById(baliseId).style.visibility='hidden';
	document.getElementById(baliseId).style.display='none';
}
var TINY={};

function T$(i){return document.getElementById(i)}
function T$$(e,p){return p.getElementsByTagName(e)}

TINY.table=function(){
	function sorter(n,t,p){this.n=n; this.id=t; this.p=p; if(this.p.init){this.init()}}
	sorter.prototype.init=function(){
		this.set(); var t=this.t, i=d=0; t.h=T$$('tr',t)[0];
		t.l=t.r.length; t.w=t.r[0].cells.length; t.a=[]; t.c=[]; this.p.is=this.p.size;
		if(this.p.colddid){
			d=T$(this.p.colddid);
			//var o=document.createElement('option'); o.value=-1; o.innerHTML='All Columns'; d.appendChild(o)
		}
		for(i;i<t.w;i++){
			var c=t.h.cells[i]; t.c[i]={};
			if(c.className!='nosort'){
				c.className=this.p.headclass; c.onclick=new Function(this.n+'.sort('+i+')');
				c.onmousedown=function(){return false};
			}
			if(this.p.columns){
				var l=this.p.columns.length, x=0;
				for(x;x<l;x++){
					if(this.p.columns[x].index==i){
						var g=this.p.columns[x];
						t.c[i].format=g.format==null?1:g.format; t.c[i].decimals=g.decimals==null?2:g.decimals
					}
				}
			}
			/*if(d){
				var o=document.createElement('option'); o.value=i; o.innerHTML=T$$('h3',c)[0].innerHTML; d.appendChild(o)
			}*/
		}
		this.reset()
	};
	sorter.prototype.reset=function(){
		var t=this.t; t.t=t.l;
		for(var i=0;i<t.l;i++){t.a[i]={}; t.a[i].s=1}
		if(this.p.sortcolumn!=undefined){
			this.sort(this.p.sortcolumn,1,this.p.is)
		}else{
			if(this.p.paginate){this.size()} this.alt(); this.sethover()
		}
		this.calc()
	};
	sorter.prototype.sort=function(x,f,z){
		var t=this.t; t.y=x; var x=t.h.cells[t.y], i=0, n=document.createElement('tbody');
		for(i;i<t.l;i++){
			t.a[i].o=i; var v=t.r[i].cells[t.y]; t.r[i].style.display='';
			while(v.hasChildNodes()){v=v.firstChild}
			t.a[i].v=v.nodeValue?v.nodeValue:''
		}
		for(i=0;i<t.w;i++){var c=t.h.cells[i]; if(c.className!='nosort'){c.className=this.p.headclass}}
		if(t.p==t.y&&!f){t.a.reverse(); x.className=t.d?this.p.ascclass:this.p.descclass; t.d=t.d?0:1}
		else{t.p=t.y; f&&this.p.sortdir==-1?t.a.sort(cp).reverse():t.a.sort(cp); t.d=0; x.className=this.p.ascclass}
		for(i=0;i<t.l;i++){var r=t.r[t.a[i].o].cloneNode(true); n.appendChild(r)}
		t.replaceChild(n,t.b); this.set(); this.alt(); if(this.p.paginate){this.size(z)} this.sethover()
	};
	sorter.prototype.sethover=function(){
		if(this.p.hoverid){
			for(var i=0;i<this.t.l;i++){
				var r=this.t.r[i];
				r.setAttribute('onmouseover',this.n+'.hover('+i+',1)');
				r.setAttribute('onmouseout',this.n+'.hover('+i+',0)')
			}
		}
	};
	sorter.prototype.calc=function(){
		if(this.p.sum||this.p.avg){
			var t=this.t, i=x=0, f,r;
			if(!T$$('tfoot',t)[0]){
				f=document.createElement('tfoot'); t.appendChild(f)
			}else{
				f=T$$('tfoot',t)[0]; while(f.hasChildNodes()){f.removeChild(f.firstChild)}
			}
			if(this.p.sum){
				r=this.newrow(f);
				for(i;i<t.w;i++){
					var j=r.cells[i];
					if(this.p.sum.exists(i)){
						var s=0, m=t.c[i].format||'';
						for(x=0;x<this.t.l;x++){
							if(t.a[x].s){s+=parseFloat(t.r[x].cells[i].innerHTML.replace(/(\$|\,)/g,''))}
						}
						s=decimals(s,t.c[i].decimals?t.c[i].decimals:2);
						s=isNaN(s)?'n/a':m=='$'?s=s.currency(t.c[i].decimals):s+m;
						r.cells[i].innerHTML=s
					}else{r.cells[i].innerHTML='&nbsp;'}
				}
			}
			if(this.p.avg){
				r=this.newrow(f);
				for(i=0;i<t.w;i++){
					var j=r.cells[i];
					if(this.p.avg.exists(i)){
						var s=c=0, m=t.c[i].format||'';
						for(x=0;x<this.t.l;x++){
							if(t.a[x].s){s+=parseFloat(t.r[x].cells[i].innerHTML.replace(/(\$|\,)/g,'')); c++}
						}
						s=decimals(s/c,t.c[i].decimals?t.c[i].decimals:2);
						s=isNaN(s)?'n/a':m=='$'?s=s.currency(t.c[i].decimals):s+m;
						j.innerHTML=s
					}else{j.innerHTML='&nbsp;'}
				}
			}
		}
	};
	sorter.prototype.newrow=function(p){
		var r=document.createElement('tr'), i=0; p.appendChild(r);
		for(i;i<this.t.w;i++){r.appendChild(document.createElement('td'))}
		return r
	};
	sorter.prototype.alt=function(){
		var t=this.t, i=x=0;
		for(i;i<t.l;i++){
			var r=t.r[i];
			if(t.a[i].s){
				r.className=x%2==0?this.p.evenclass:this.p.oddclass; var cells=T$$('td',r);
				for(var z=0;z<t.w;z++){cells[z].className=t.y==z?x%2==0?this.p.evenselclass:this.p.oddselclass:''}
				x++
			}
			if(!t.a[i].s){r.style.display='none'}
		}
	};
	sorter.prototype.page=function(s){
		var t=this.t, i=x=0, l=s+parseInt(this.p.size);
		if(this.p.totalrecid){T$(this.p.totalrecid).innerHTML=t.t}
		if(this.p.currentid){T$(this.p.currentid).innerHTML=this.g}
		if(this.p.startingrecid){
			var b=((this.g-1)*this.p.size)+1, m=b+(this.p.size-1); m=m<t.l?m:t.t; m=m<t.t?m:t.t;
			T$(this.p.startingrecid).innerHTML=t.t==0?0:b;; T$(this.p.endingrecid).innerHTML=m
		}
		for(i;i<t.l;i++){var r=t.r[i]; if(t.a[i].s){r.style.display=x>=s&&x<l?'':'none'; x++}else{r.style.display='none'}}
	};
	sorter.prototype.move=function(d,m){
		this.goto(d==1?(m?this.d:this.g+1):(m?1:this.g-1))
	};
	sorter.prototype.goto=function(s){
		if(s<=this.d&&s>0){this.g=s; this.page((s-1)*this.p.size)}
	};
	sorter.prototype.size=function(s){
		var t=this.t;
		if(s){this.p.size=s}
		this.g=1; this.d=Math.ceil(this.t.t/this.p.size);
		if(this.p.navid){T$(this.p.navid).style.display=this.d<2?'none':'block'}
		this.page(0);
		if(this.p.totalid){T$(this.p.totalid).innerHTML=t.t==0?1:this.d}
		if(this.p.pageddid){
			var d=T$(this.p.pageddid), l=this.d+1;
			d.setAttribute('onchange',this.n+'.goto(this.value)');
			while(d.hasChildNodes()){d.removeChild(d.firstChild)}
			for(var i=1;i<=this.d;i++){
				var o=document.createElement('option');
				o.value=i; o.innerHTML=i; d.appendChild(o)
			}
		}
	};
	sorter.prototype.showall=function(){
		this.size(this.t.t)
	};
	sorter.prototype.search=function(f){
		var i=x=n=0, k=-1, q=T$(f).value.toLowerCase();
		//if(this.p.colddid){k=T$(this.p.colddid).value}
		var s=(k==-1)?0:k, e=(k==-1)?this.t.w:parseInt(s)+1;
		for(i;i<this.t.l;i++){
			var r=this.t.r[i], v;
			if(q==''){
				v=1
			}else{
				for(x=s;x<e;x++){
					var b=r.cells[x].innerHTML.toLowerCase();
					if(b.indexOf(q)==-1){v=0}else{v=1; break}
				}
			}
			if(v){n++}
			this.t.a[i].s=v
		}
		this.t.t=n;
		if(this.p.paginate){this.size()}
		this.calc(); this.alt()
	};
	sorter.prototype.hover=function(i,d){
		this.t.r[i].id=d?this.p.hoverid:''
	};
	sorter.prototype.set=function(){
		var t=T$(this.id); t.b=T$$('tbody',t)[0]; t.r=t.b.rows; this.t=t
	};
	Array.prototype.exists=function(v){
		for(var i=0;i<this.length;i++){if(this[i]==v){return 1}} return 0
	};
	Number.prototype.currency=function(c){
		var n=this, d=n.toFixed(c).split('.');
		d[0]=d[0].split('').reverse().join('').replace(/(\d{3})(?=\d)/g,'$1,').split('').reverse().join('');
		return '$'+d.join('.')
	};
	function decimals(n,d){return Math.round(n*Math.pow(10,d))/Math.pow(10,d)};
	function cp(f,c){
		var g,h; f=g=f.v.toLowerCase(); c=h=c.v.toLowerCase();
		var i=parseFloat(f.replace(/(\$|\,)/g,'')), n=parseFloat(c.replace(/(\$|\,)/g,''));
		if(!isNaN(i)&&!isNaN(n)){g=i,h=n}
		i=Date.parse(f); n=Date.parse(c);
		if(!isNaN(i)&&!isNaN(n)){g=i; h=n}
		return g>h?1:(g<h?-1:0)
	};
	return{sorter:sorter}
}();

var DIAPO={};

function $(i){return document.getElementById(i)}
function $$(e,p){p=p||document; return p.getElementsByTagName(e)}

DIAPO.slideshow=function(n){
	this.infoSpeed=this.imgSpeed=this.speed=10;
	this.thumbOpacity=this.navHover=70;
	this.navOpacity=25;
	this.scrollSpeed=5;
	this.letterbox='#000';
	this.n=n;
	this.c=0;
	this.a=[]
};

DIAPO.slideshow.prototype={
	init:function(s,z,b,f,q){
	
		s=$(s);
		var m=$$('li',s), i=0, w=0, y=0;
		this.l=m.length;
		this.q=$(q);
		this.f=$(z);
		this.r=$(this.info);
		this.o=parseInt(DIAPO.style.val(z,'width'));
		this.x=parseInt(DIAPO.style.val(z,'height'));
		if(this.thumbs){
			var u=$(this.left), r=$(this.right);
			u.onmouseover=new Function('DIAPO.scroll.init("'+this.thumbs+'",-1,'+this.scrollSpeed+')');
			u.onmouseout=r.onmouseout=new Function('DIAPO.scroll.cl("'+this.thumbs+'")');
			r.onmouseover=new Function('DIAPO.scroll.init("'+this.thumbs+'",1,'+this.scrollSpeed+')');
			this.p=$(this.thumbs)
		}
		for(i;i<this.l;i++){
			this.a[i]={};
			var h=m[i], a=this.a[i];
			//ici pour avoir les information
			a.t=$$('h3',h)[0].innerHTML;
			a.d=$$('p',h)[0].innerHTML;
			a.l=$$('a',h)[0]?$$('a',h)[0].href:'';
			a.p=$$('span',h)[0].innerHTML;
			
			
			//bugg d'affichage 
			/*--------------------------------------------------------------------------------------*/
			/*if(this.thumbs){
				var g=$$('img',h)[0];
				this.p.appendChild(g);
				w+=parseInt(g.offsetWidth);
				y+=parseInt(g.offsetHeight);
				if(i!=this.l-1){
					
					g.style.marginRight=this.spacing+'px';
					w+=this.spacing;
					y+=this.spacing;
					
				}
				this.p.style.width=w+'px';
				this.p.style.height=y+'px';
				g.style.opacity=this.thumbOpacity/100;
				g.style.filter='alpha(opacity='+this.thumbOpacity+')';
				g.onmouseover=new Function('DIAPO.alpha.set(this,100,5)');
				g.onmouseout=new Function('DIAPO.alpha.set(this,'+this.thumbOpacity+',5)');
				g.onclick=new Function(this.n+'.pr('+i+',1)')
			}*/
			/*--------------------------------------------------------------------------------------*/
		}
		if(b&&f){
			b=$(b);
			f=$(f);
			b.style.opacity=f.style.opacity=this.navOpacity/100;
			b.style.filter=f.style.filter='alpha(opacity='+this.navOpacity+')';
			b.onmouseover=f.onmouseover=new Function('DIAPO.alpha.set(this,'+this.navHover+',5)');
			b.onmouseout=f.onmouseout=new Function('DIAPO.alpha.set(this,'+this.navOpacity+',5)');
			b.onclick=new Function(this.n+'.mv(-1,1)');
			f.onclick=new Function(this.n+'.mv(1,1)')
		}
		this.auto?this.is(0,0):this.is(0,1)
	},
	mv:function(d,c){
		var t=this.c+d;
		this.c=t=t<0?this.l-1:t>this.l-1?0:t;
		this.pr(t,c)
	},
	pr:function(t,c){
		clearTimeout(this.lt);
		if(c){
			clearTimeout(this.at)
		}
		this.c=t;
		this.is(t,c)
	},
	is:function(s,c){
		if(this.info){
			DIAPO.height.set(this.r,1,this.infoSpeed/2,-1)
		}
		var i=new Image();
		i.style.opacity=0;
		i.style.filter='alpha(opacity=0)';
		this.i=i;
		
		i.onload=new Function(this.n+'.le('+s+','+c+')');
		i.src=this.a[s].p;
		if(this.thumbs){
			var a=$$('img',this.p), l=a.length, x=0;
			for(x;x<l;x++){
				a[x].style.backgroundColor=x!=s?'':this.active
			}
		}
	},
	le:function(s,c){
		this.f.appendChild(this.i);
		var w=this.o-parseInt(this.i.offsetWidth);
		var y=this.x-parseInt(this.i.offsetHeight);
		if(y>0){
			var l=Math.floor(y/2);
			this.i.style.borderTop=l+'px solid '+this.letterbox;
			this.i.style.borderBottom=l+'px solid '+this.letterbox;
		}
		if(w>0){
			var l=Math.floor(w/2);
			this.i.style.borderLeft=l+'px solid '+this.letterbox;
			this.i.style.borderRight=(w-l)+'px solid '+this.letterbox
		}
		DIAPO.alpha.set(this.i,100,this.imgSpeed);
		var n=new Function(this.n+'.nf('+s+')');
		this.lt=setTimeout(n,this.imgSpeed*100);
		if(!c){
			this.at=setTimeout(new Function(this.n+'.mv(1,0)'),this.speed*1000)
		}
		if(this.a[s].l!=''){
			this.q.onclick=new Function('window.location="'+this.a[s].l+'"');
			this.q.onmouseover=new Function('this.className="'+this.link+'"');
			this.q.onmouseout=new Function('this.className=""');
			this.q.style.cursor='pointer'
		}else{
			this.q.onclick=this.q.onmouseover=null;
			this.q.style.cursor='default'
		}
		var m=$$('img',this.f);
		if(m.length>2){
			this.f.removeChild(m[0])
		}
	},
	//fonction qui affiche les information
	nf:function(s){
		if(this.info){
			s=this.a[s];		
			$$('h3',this.r)[0].innerHTML=s.t;
			$$('p',this.r)[0].innerHTML=s.d;
			this.r.style.height='auto';
			var h=parseInt(this.r.offsetHeight);
			this.r.style.height=0;
			//teste si il y a un titre ou un texte d'information
			// si oui affiche les info
			if((s.t!='') || (s.d!=''))
			{DIAPO.height.set(this.r,h,this.infoSpeed,0)}
		}
	}
};

DIAPO.scroll=function(){
	return{
		init:function(e,d,s){
			e=typeof e=='object'?e:$(e); var p=e.style.left||DIAPO.style.val(e,'left'); e.style.left=p;
			var l=d==1?parseInt(e.offsetWidth)-parseInt(e.parentNode.offsetWidth):0; e.si=setInterval(function(){DIAPO.scroll.mv(e,l,d,s)},20)
		},
		mv:function(e,l,d,s){
			var c=parseInt(e.style.left); if(c==l){DIAPO.scroll.cl(e)}else{var i=Math.abs(l+c); i=i<s?i:s; var n=c-i*d; e.style.left=n+'px'}
		},
		cl:function(e){e=typeof e=='object'?e:$(e); clearInterval(e.si)}
	}
}();

DIAPO.height=function(){
	return{
		set:function(e,h,s,d){
			e=typeof e=='object'?e:$(e); var oh=e.offsetHeight, ho=e.style.height||DIAPO.style.val(e,'height');
			ho=oh-parseInt(ho); var hd=oh-ho>h?-1:1; clearInterval(e.si); e.si=setInterval(function(){DIAPO.height.tw(e,h,ho,hd,s)},20)
		},
		tw:function(e,h,ho,hd,s){
			var oh=e.offsetHeight-ho;
			if(oh==h){clearInterval(e.si)}else{if(oh!=h){e.style.height=oh+(Math.ceil(Math.abs(h-oh)/s)*hd)+'px'}}
		}
	}
}();

DIAPO.alpha=function(){
	return{
		set:function(e,a,s){
			e=typeof e=='object'?e:$(e); var o=e.style.opacity||DIAPO.style.val(e,'opacity'),
			d=a>o*100?1:-1; e.style.opacity=o; clearInterval(e.ai); e.ai=setInterval(function(){DIAPO.alpha.tw(e,a,d,s)},20)
		},
		tw:function(e,a,d,s){
			var o=Math.round(e.style.opacity*100);
			if(o==a){clearInterval(e.ai)}else{var n=o+Math.ceil(Math.abs(a-o)/s)*d; e.style.opacity=n/100; e.style.filter='alpha(opacity='+n+')'}
		}
	}
}();

DIAPO.style=function(){return{val:function(e,p){e=typeof e=='object'?e:$(e); return e.currentStyle?e.currentStyle[p]:document.defaultView.getComputedStyle(e,null).getPropertyValue(p)}}}();

var DIAPO1={};

function T$(i){return document.getElementById(i)}
function T$$(e,p){return p.getElementsByTagName(e)}

DIAPO1.slider=function(){
	function slide(n,p){this.n=n; this.init(p)}
	slide.prototype.init=function(p){
		var s=this.x=T$(p.id), u=this.u=T$$('ul',s)[0], c=this.m=T$$('li',u), l=c.length, i=this.l=this.c=0; this.b=1;
		if(p.navid&&p.activeclass){this.g=T$$('li',T$(p.navid)); this.s=p.activeclass}
		this.a=p.auto||0; this.p=p.resume||0; this.r=p.rewind||0; this.e=p.elastic||false; this.v=p.vertical||0; s.style.overflow='hidden';
		for(i;i<l;i++){if(c[i].parentNode==u){this.l++}}
		if(this.v){;
			u.style.top=0; this.h=p.height||c[0].offsetHeight; u.style.height=(this.l*this.h)+'px'
		}else{
			u.style.left=0; this.w=p.width||c[0].offsetWidth; u.style.width=(this.l*this.w)+'px'
		}
		this.nav(p.position||0);
		if(p.position){this.pos(p.position||0,this.a?1:0,1)}else if(this.a){this.auto()}
		if(p.left){this.sel(p.left)}
		if(p.right){this.sel(p.right)}
	},
	slide.prototype.auto=function(){
		this.x.ai=setInterval(new Function(this.n+'.move(1,1,1)'),this.a*1000)
	},
	slide.prototype.move=function(d,a){
		var n=this.c+d;
		if(this.r){n=d==1?n==this.l?0:n:n<0?this.l-1:n}
		this.pos(n,a,1)
	},
	slide.prototype.pos=function(p,a,m){
		var v=p; clearInterval(this.x.ai); clearInterval(this.x.si);
		if(!this.r){
			if(m){
				if(p==-1||(p!=0&&Math.abs(p)%this.l==0)){
					this.b++;
					for(var i=0;i<this.l;i++){this.u.appendChild(this.m[i].cloneNode(1))}
					this.v?this.u.style.height=(this.l*this.h*this.b)+'px':this.u.style.width=(this.l*this.w*this.b)+'px';
				}
				if(p==-1||(p<0&&Math.abs(p)%this.l==0)){
					this.v?this.u.style.top=(this.l*this.h*-1)+'px':this.u.style.left=(this.l*this.w*-1)+'px'; v=this.l-1
				}
			}else if(this.c>this.l&&this.b>1){
				v=(this.l*(this.b-1))+p; p=v
			}
		}
		var t=this.v?v*this.h*-1:v*this.w*-1, d=p<this.c?-1:1; this.c=v; var n=this.c%this.l; this.nav(n);
		if(this.e){t=t-(8*d)}
		this.x.si=setInterval(new Function(this.n+'.slide('+t+','+d+',1,'+a+')'),10)
	},
	slide.prototype.nav=function(n){
		if(this.g){for(var i=0;i<this.l;i++){this.g[i].className=i==n?this.s:''}}
	},
	slide.prototype.slide=function(t,d,i,a){
		var o=this.v?parseInt(this.u.style.top):parseInt(this.u.style.left);
		if(o==t){
			clearInterval(this.x.si);
			if(this.e&&i<3){
				this.x.si=setInterval(new Function(this.n+'.slide('+(i==1?t+(12*d):t+(4*d))+','+(i==1?(-1*d):(-1*d))+','+(i==1?2:3)+','+a+')'),10)
			}else{
				if(a||(this.a&&this.p)){this.auto()}
				if(this.b>1&&this.c%this.l==0){this.clear()}
			}
		}else{
			var v=o-Math.ceil(Math.abs(t-o)*.1)*d+'px';
			this.v?this.u.style.top=v:this.u.style.left=v
		}
	},
	slide.prototype.clear=function(){
		var c=T$$('li',this.u), t=i=c.length; this.v?this.u.style.top=0:this.u.style.left=0; this.b=1; this.c=0;
		for(i;i>0;i--){
			var e=c[i-1];
			if(t>this.l&&e.parentNode==this.u){this.u.removeChild(e); t--}
		}
	},
	slide.prototype.sel=function(i){
		var e=T$(i); e.onselectstart=e.onmousedown=function(){return false}
	}
	return{slide:slide}
}();
