	
		var arrPictures = new Array();
		var arrCaptions = new Array();
		var curPicture = 1;
		var curTab = 1;
		var slideOn = false;
		var xOp7=false,xOp5or6=false,xIE4Up=false,xNN4=false,xUA=navigator.userAgent.toLowerCase();
		if(window.opera){
		xOp7=(xUA.indexOf('opera 7')!=-1 || xUA.indexOf('opera/7')!=-1);
		if (!xOp7) xOp5or6=(xUA.indexOf('opera 5')!=-1 || xUA.indexOf('opera/5')!=-1 || xUA.indexOf('opera 6')!=-1 || xUA.indexOf('opera/6')!=-1);
		}
		else if(document.layers) xNN4=true;
		else {xIE4Up=document.all && xUA.indexOf('msie')!=-1 && parseInt(navigator.appVersion)>=4;}

		function clickIE4(){
			if (event.button==2){
			//alert(message);
			return false;
			}
		}
		
		function clickNS4(e){
			if (document.layers||document.getElementById&&!document.all){
				if (e.which==2||e.which==3){
				//alert(message);
				return false;
				}
			}
		}

		function ChangeImage(strLocation, strImageFile) {
			
			if (xIE4Up){
				document.images.EventImage.style.filter= "blendTrans(duration=2)"
				document.images.EventImage.filters.blendTrans.Apply();
			}
			
			var strImagePath = unescape(strLocation + "/images/" + strImageFile);
			document.images.EventImage.src = strImagePath;
			
			if (xIE4Up){
				document.images.EventImage.filters.blendTrans.Play();
			}
			
		}
										
		function ShowPicture(strLocation, strImageFile, strCaption, intPictureID) 
		{
	        if (!slideOn)
			{
				ChangeImage(strLocation, strImageFile);
				if (xIE4Up) {
					if (strCaption != '')
					{
						document.all.lblCaption.innerHTML = strCaption;
					}
					else {
						document.all.lblCaption.innerHTML = "<font color=\"#FFFFFF\">spacer</font>";
					}
				}
				curPicture = intPictureID;
				document.all.lblCount.innerHTML = (curPicture + "") + "/" + ((arrPictures.length) + "");
			}
		}

		function init(){
			if (document.layers){
				document.captureEvents(Event.MOUSEDOWN);
				document.onmousedown=clickNS4;
			}
			else if (document.all&&!document.getElementById){
				document.onmousedown=clickIE4;
			}
			document.oncontextmenu=new Function("return false");
			if (curPage == 'f')
				document.all.lblCount.innerHTML = (curPicture + "") + "/" + ((arrPictures.length) + "");
		}
		
		function AddPicture(strImage, strCaption) {
			arrPictures[arrPictures.length] = strImage;
			arrCaptions[arrCaptions.length] = strCaption;
		}

		function StartSlide(strLocation){
			document.all.pause_button.style.disabled = false;
			slideOn = true;
			ChangeImage(strLocation, arrPictures[curPicture]);
			if (arrCaptions[curPicture] != '')
			{
				document.all.lblCaption.innerHTML = arrCaptions[curPicture];
			}
			else {
				document.all.lblCaption.innerHTML = "<font color=\"#FFFFFF\">spacer</font>";
			}
			curPicture++;
			document.all.lblCount.innerHTML = (curPicture + "") + "/" + ((arrPictures.length) + "");
			if (curPicture > (arrPictures.length-1)) curPicture = 0;
			t = setTimeout("StartSlide('" + strLocation + "')", 4000);
		}
		
		function StopSlide(strLocation){
			if (slideOn) {
				slideOn = false;				
				document.all.play_button.style.disabled = false;
				document.all.pause_button.style.disabled = true;				
				self.location.href = "evento.aspx?l=" + strLocation  + "&tab=" + curTab + "&pi=" + curPicture + "&pg=f";
			}
		}
		

