function FlashTopo(swf,largura,altura,LocalId){
    STRFlash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+largura+'" height="'+altura+'" name="myFlash">'
    STRFlash += '<param name="movie" value="'+swf+'" />'
    STRFlash += '<param name="quality" value="high" />'
    STRFlash += '<param name="wmode" value="transparent" />'
    STRFlash += '<embed src="'+swf+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+largura+'" height="'+altura+'" name="myFlash" wmode="transparent"></embed>'
    STRFlash += '</object>'
    document.getElementById(LocalId).innerHTML = STRFlash;
} 

function FlashMenu(swf,largura,altura,LocalId){
STRFlash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+largura+'" height="'+altura+'" >'
STRFlash += '<param name="movie" value="'+swf+'" />'
STRFlash += '<param name="quality" value="high" />'
STRFlash += '<param name="wmode" value="transparent" />'
STRFlash += '<embed src="'+swf+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+largura+'" height="'+altura+'" wmode="transparent"></embed>'
STRFlash += '</object>'
document.getElementById(LocalId).innerHTML = STRFlash;
} 

function FlashDestaques(swf,largura,altura,LocalId){
STRFlash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+largura+'" height="'+altura+'" >'
STRFlash += '<param name="movie" value="'+swf+'" />'
STRFlash += '<param name="quality" value="high" />'
STRFlash += '<param name="wmode" value="transparent" />'
STRFlash += '<embed src="'+swf+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+largura+'" height="'+altura+'" wmode="transparent"></embed>'
STRFlash += '</object>'
document.getElementById(LocalId).innerHTML = STRFlash;
} 

if (screen.width==800||screen.height==600) {
new ypSlideOutMenu("menu1", "down", 50, 245, 195, 250)
new ypSlideOutMenu("menu2", "down", 203, 245, 195, 250)
new ypSlideOutMenu("menu3", "down", 398, 245, 195, 250)
new ypSlideOutMenu("menu4", "down", 593, 245, 195, 250)
new ypSlideOutMenu("menu5", "down", 593, 245, 195, 250)
}
else if (screen.width==1024||screen.height==768) {
new ypSlideOutMenu("menu1", "down", 120, 245, 195, 250)
new ypSlideOutMenu("menu2", "down", 285, 245, 195, 250)
new ypSlideOutMenu("menu3", "down", 475, 245, 195, 250)
new ypSlideOutMenu("menu4", "down", 670, 245, 195, 250)
new ypSlideOutMenu("menu5", "down", 690, 245, 195, 250)
}
else if (screen.width==1280||screen.height==800) {
new ypSlideOutMenu("menu1", "down", 252, 245, 195, 250)
new ypSlideOutMenu("menu2", "down", 405, 245, 195, 250)
new ypSlideOutMenu("menu3", "down", 598, 245, 195, 250)
new ypSlideOutMenu("menu4", "down", 795, 245, 195, 250)
new ypSlideOutMenu("menu5", "down", 790, 245, 195, 250)
}
else if (screen.width==1440||screen.height==900) {
new ypSlideOutMenu("menu1", "down", 332, 245, 195, 250)
new ypSlideOutMenu("menu2", "down", 485, 245, 195, 250)
new ypSlideOutMenu("menu3", "down", 678, 245, 195, 250)
new ypSlideOutMenu("menu4", "down", 875, 245, 195, 250)
new ypSlideOutMenu("menu5", "down", 870, 245, 195, 250)
}
else {
new ypSlideOutMenu("menu1", "down", 120, 245, 195, 250)
new ypSlideOutMenu("menu2", "down", 285, 245, 195, 250)
new ypSlideOutMenu("menu3", "down", 475, 245, 195, 250)
new ypSlideOutMenu("menu4", "down", 670, 245, 195, 250)
new ypSlideOutMenu("menu5", "down", 690, 245, 195, 250)
}

var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
function myFlash_DoFSCommand(command, args)                {
  var myFlashObj = InternetExplorer ? myFlash : document.myFlash;
	  ypSlideOutMenu[command](args)
} 
	
var plugin = 0;
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
if (navigator.plugins && navigator.plugins["Shockwave Flash"])
plugin = 1;
}

// Destaques
var slideshow2_noFading = false;	// Just normal show/hide without fading ?
var slideshow2_timeBetweenSlides = 3000;	// Amount of time between each image(1000 = 1 second)
var slideshow2_fadingSpeed = 20;	// Speed of fading
	
	
/* Don't change any of these values */
var slideshow2_galleryHeigh;	// Height of galery	
var slideshow2_galleryContainer;	// Reference to the gallery div
var slideshow2_galleryWidth;	// Width of gallery	
var slideshow2_slideIndex = -1;	// Index of current image shown
var slideshow2_slideIndexNext = false;	// Index of next image shown
var slideshow2_imageDivs = new Array();	// Array of image divs(Created dynamically)
var slideshow2_currentOpacity = 100;	// Initial opacity
var slideshow2_imagesInGallery = false;	// Number of images in gallery
	
function getGalleryImageSize(imageIndex)
{
	if(imageIndex==slideshow2_imagesInGallery){			
	showGallery();
	}else{
	var imgObj = document.getElementById('galleryImage' + imageIndex);
	var imgWidth = imgObj.width;
	var imgHeight = imgObj.height;
	if(imgWidth>50){						
		var tmpDiv = document.createElement('DIV');
		tmpDiv.id = 'galleryDiv' + imageIndex;
		tmpDiv.style.visibility = 'hidden';
		tmpDiv.className='imageInGallery';
		slideshow2_galleryContainer.appendChild(tmpDiv);
		tmpDiv.appendChild(imgObj);
		imgObj.style.left = Math.round((slideshow2_galleryWidth - imgWidth)/2)  + "px";
		imgObj.style.top = Math.round((slideshow2_galleryHeight - imgHeight)/2)  + "px";
		tmpDiv.style.visibility = 'hidden';
		slideshow2_imageDivs.push(tmpDiv);
		imageIndex++;
		getGalleryImageSize(imageIndex);
	}else{
	setTimeout('getGalleryImageSize(' + imageIndex + ')',10);
	}
  }		
}

function showGallery()
{
	if(slideshow2_slideIndex==-1)slideshow2_slideIndex=0; else slideshow2_slideIndex++;	// Index of next image to show
	if(slideshow2_slideIndex==slideshow2_imageDivs.length)slideshow2_slideIndex=0;
	slideshow2_slideIndexNext = slideshow2_slideIndex+1;	// Index of the next next image
	if(slideshow2_slideIndexNext==slideshow2_imageDivs.length)slideshow2_slideIndexNext = 0;
		
	slideshow2_currentOpacity=100;	// Reset current opacity
	// Displaying image divs
	slideshow2_imageDivs[slideshow2_slideIndex].style.visibility = 'visible';
	if(navigator.userAgent.indexOf('Opera')<0){
		slideshow2_imageDivs[slideshow2_slideIndexNext].style.visibility = 'visible';
	}
			
	if(document.all){	// IE rules
		slideshow2_imageDivs[slideshow2_slideIndex].style.filter = 'alpha(opacity=100)';
		slideshow2_imageDivs[slideshow2_slideIndexNext].style.filter = 'alpha(opacity=1)';
	}else{
		slideshow2_imageDivs[slideshow2_slideIndex].style.opacity = 0.99;	// Can't use 1 and 0 because of screen flickering in FF
		slideshow2_imageDivs[slideshow2_slideIndexNext].style.opacity = 0.01;
	}		
		
	setTimeout('revealImage()',slideshow2_timeBetweenSlides);		
}
	
function revealImage()
{
	if(slideshow2_noFading){
		slideshow2_imageDivs[slideshow2_slideIndex].style.visibility = 'hidden';
		showGallery();
		return;
	}
	slideshow2_currentOpacity--;
	if(document.all){
		slideshow2_imageDivs[slideshow2_slideIndex].style.filter = 'alpha(opacity='+slideshow2_currentOpacity+')';
		slideshow2_imageDivs[slideshow2_slideIndexNext].style.filter = 'alpha(opacity='+(100-slideshow2_currentOpacity)+')';
	}else{
		slideshow2_imageDivs[slideshow2_slideIndex].style.opacity = Math.max(0.01,slideshow2_currentOpacity/100);	// Can't use 1 and 0 because of screen flickering in FF
		slideshow2_imageDivs[slideshow2_slideIndexNext].style.opacity = Math.min(0.99,(1 - (slideshow2_currentOpacity/100)));
	}
	if(slideshow2_currentOpacity>0){
		setTimeout('revealImage()',slideshow2_fadingSpeed);
	}else{
		slideshow2_imageDivs[slideshow2_slideIndex].style.visibility = 'hidden';			
		showGallery();
	}
}
	
function initImageGallery()
{
	slideshow2_galleryContainer = document.getElementById('imageSlideshowHolder');
	slideshow2_galleryWidth = slideshow2_galleryContainer.clientWidth;
	slideshow2_galleryHeight = slideshow2_galleryContainer.clientHeight;
	galleryImgArray = slideshow2_galleryContainer.getElementsByTagName('IMG');
	for(var no=0;no<galleryImgArray.length;no++){
		galleryImgArray[no].id = 'galleryImage' + no;
	}
	slideshow2_imagesInGallery = galleryImgArray.length;
	getGalleryImageSize(0);
}