//CHAMA FLASH
function callFlash(swf,largura,altura,id_objeto,wmode,flashvars){
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,24,0" width="'+largura+'" height="'+altura+'" align="middle" id="'+id_objeto+'">');
    document.write('<param name=movie value="'+swf+'">');
    document.write('<param name="allowScriptAccess" value="sameDomain">');
	document.write('<param name="quality" value="best">');
    document.write('<param name="menu" value="false">');
	document.write('<param name="wmode" value="'+wmode+'">');
	document.write('<param name="salign" value="lt">');
	document.write('<param name="FlashVars" value="'+flashvars+'">');	
    document.write('<embed src="'+swf+'" quality="best" width="'+largura+'" height="'+altura+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>');
    document.write('</object>')
}
// IMAGE GALLERY
// set the starting image.
var i = 0;
// The array of div names which will hold the images.
var image_slide = new Array('image-1', 'image-2', 'image-3','image-4','image-5','image-6','image-7','image-8','image-9','image-10');
// The number of images in the array.
var NumOfImages = image_slide.length;
// The time to wait before moving to the next image. Set to 4 seconds by default.
var wait = 8000;
// The Fade Function
function SwapImage(x,y) {		
	$(image_slide[x]).appear({ duration: 0.5 });
	$(image_slide[y]).fade({duration: 0.5});
}
// the onload event handler that starts the fading.
function StartSlideShow() {
	play = setInterval('Play()',wait);
}
function Play() {
	var imageShow, imageHide;
	imageShow = i+1;
	imageHide = i;
	if (imageShow == NumOfImages) {
		SwapImage(0,imageHide);	
		i = 0;					
	} else {
		SwapImage(imageShow,imageHide);			
		i++;
	}
	var textIn = i+1 + ' of ' + NumOfImages;
}