///////////////////////////////////////////////////////////
/// Magic Image Rotation								///
///	v 1.0.1												///
/// Copyright 2007, Loyce Bradley Petrey				///
///	All Rights Reserved.								///
/// http://www.EchoChrist.com/MagicImage				///
/// webmaster@EchoChrist.com							///
///														///
///	This script is free to use as long as this notice 	///
/// remains unchanged and intact.					 	///
///														///
/// This program is free software: you can redistribute ///
///	it and/or modify it under the terms of the GNU 		///
///	General Public License as published by the Free 	///
///	Software Foundation. 								///
///														///
/// This program is distributed in the hope that it 	///
/// will be useful, but WITHOUT ANY WARRANTY; without 	///
///	even the implied warranty of MERCHANTABILITY or 	///
///	FITNESS FOR A PARTICULAR PURPOSE.  					///
/// 													///
/// Be Imitators of God as dear children and walk		///
/// in love as Christ also loved us.					///
///	Ephesians 5:1-2										///
///////////////////////////////////////////////////////////

var CasoLoad = 
[
['/images/atuacoes_cases/image_case03.jpg', '/atuacoes_cases/cases03.aspx',	'&raquo; Planejando o Presente e o Futuro', 	'Uma empresa brasileira de m&eacute;dio porte se prepara hoje para a chegada do futuro.'			],		
['/images/atuacoes_cases/image_case04.jpg', '/atuacoes_cases/cases02.aspx',	'&raquo; Expresso Aeroporto e Trem de Guarulhos - Modelagem Financeira', 	'Cons&oacute;rcio de 2 empresas nacionais, 2 espanholas e 1 italiana em uma concorr&ecirc;ncia p&uacute;blica.'		],		
['/images/atuacoes_cases/image_case.jpg', '/atuacoes_cases/cases.aspx',	'&raquo; An&aacute;lise da Atratividade', 	'Avalia&ccedil;&atilde;o para o lan&ccedil;amento de dois novos produtos e suas oportunidades de mercado.'		],	
['/images/atuacoes_cases/image_case02.jpg', '/atuacoes_cases/cases01.aspx',	'&raquo; Diretrizes Estrat&eacute;gicas', 	'Tr&ecirc;s empresas nacionais e tradicionais fundam um novo neg&oacute;cio no pa&iacute;s.'		],	
];

var ImageCount1		= 4;			//  *****  Change this to the total number of images loaded above  ***** 		//	
var ImageDelay1		= 8000;			//  *****  Set this to the delay interval desired.  5000 = 5 seconds.			// 
var LinkTarget		= "_self"		//  *****  Defines where you want linked page to open. _self, _blank, _top, etc	//
var ImageIndex1		= 0;			//  DO NOT ALTER	//
var FirstLoad1 		= 0;			//  DO NOT ALTER	//
var QuickStart1ID 	= 0;  			//  DO NOT ALTER	//
var htmlString 		= ""			//  DO NOT ALTER 	//

//  This function rotates the banner  //
function ImageChangeCaso()

{		

htmlString = '<img src="';		
htmlString = htmlString + CasoLoad[ImageIndex1][0];
htmlString = htmlString + '" align="left" style="margin:0 5px 5px 0"><a href="';				
htmlString = htmlString + CasoLoad[ImageIndex1][1];
htmlString = htmlString + '">';
htmlString = htmlString + CasoLoad[ImageIndex1][2];
htmlString = htmlString + '</a><br /><br />';
htmlString = htmlString + CasoLoad[ImageIndex1][3];
htmlString = htmlString + ' <br />';	
htmlString = htmlString + '<a href="';		
htmlString = htmlString + CasoLoad[ImageIndex1][1];
htmlString = htmlString + '">Acompanhe</a>';				

document.getElementById('CasoTexto').innerHTML = htmlString; 				

if(ImageIndex1 == ImageCount1 - 1)		//  This statement increments image displayed and resets if displaying last image  //
{										
ImageIndex1= 0;																				
}																								
else																							
{																								
ImageIndex1++;																					
}																										

if(FirstLoad1 == 0)						//  Determins if this is the first time function has run.   // 
{
SlowFinish1();
}

}
//  End Funtion  //

//  This function ensures first banner is displayted without a delay  //
function  QuickStart1()
{
QuickStart1ID=setInterval("ImageChangeCaso()", 1000);
}
//  End Funtion  //																		

//  This function sets display rate to user defined speed  //
function SlowFinish1()
{
clearInterval(QuickStart1ID);
FirstLoad1 = 1;
setInterval("ImageChangeCaso()", ImageDelay1);	 
}
//  End Funtion  //

QuickStart1()
