//SlideShow-->
//page_less : javascript:page_less('http://www.itnet.com.br/destaques/sextacultural_aneisdovento/index.html',600,450)
slide = {
	_imagens : [


["destaques/master_ideia_slide.jpg","javascript:page_less('http://www.itnet.com.br/destaques/master_ideia_contato',790,590)"],
["destaques/slide_6_feijoada_do_lar.jpg","javascript:page_less('http://itnet.com.br/promocoes/promocao_6_feijoada/',506,419)"],
["destaques/auto_escola_itabaiana.jpg","http://www.youtube.com/watch?v=Qy0DeKTaezA"],
["destaques/slide_mundo_dos_lubrificantes_fotos.jpg","http://muraldefotos.itnet.com.br/index.php?mur_id=935"],
["destaques/charman_slide_2010.jpg","javascript:page_less('http://www.itnet.com.br/destaques/chaman_thieres_2010',700,500)"],
["destaques/inove_05_2010.jpg","javascript:page_less('http://www.itnet.com.br/destaques/inove_2010/index.html',760,533)"],
["destaques/osbat_slide.jpg",""],

		],
	
	
	_count : 0,
	
	_length : 7,
	
	_timeOutID : null,
	
	pause : false,
	
	_start : function(){
		this._preLoader();
		this._work();
	},
	
		_preLoader : function(){
		for(x in this._imagens){
			var image = new Image();
			//alert(this._imagens[x][0]);            
			image.src = this._imagens[x][0];
		}
	},
	
	_work : function(){
		(this._count == this._length) ? this._count = 0 : (this._count < 0) ? this._count = this._length-1 : void(0);
		var current = this._imagens[this._count];
		this._exchange(current);
		if(!this.pause){
			(typeof(this._timeOutID) == "number") ? clearTimeout(this._timeOutID) : void(0);
			this._timeOutID = setTimeout(function(){ slide._next(); }, 4000);
		}
	},
	
	_exchange : function(img){
		document.getElementById("slideImg").src = img[0];
		document.getElementById("link").href = img[1]
	// Se ligar nas diferenças de cada objeto, Ex.: src, href e innerHTML.
	},
	
	_next : function(){
		this._count++;
		this._work();
	},
	
	_previous : function(){
		this._count--;
		this._work();
	},
	
	_pause : function(){
		var img = document.getElementById("play|pause");
		if(this.pause){
			this.pause = false;
			img.src = 'images/2009/slide_pausa.gif';
			img.title = 'Parar';
		}
		else{
			this.pause = true;
			img.src = 'images/2009/slide_play.gif';
			img.title = 'Continuar';		
		}
		(typeof(this._timeOutID) == "number") ? clearTimeout(this._timeOutID) : void(0);
		this._work();
	}
}
//SlideShow-->