var ua = navigator.userAgent.toLowerCase();
var isIE = ( (ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1) && (ua.indexOf("webtv") == -1) );

var ap = window.navigator.appVersion;
var IE8 = false;
if (ap.indexOf("MSIE 8") != -1){
	IE8 = true;	
}

var i = 0;
var ind_master = 0;
var ind_Floater = 0;
var ind_FloaterArea = 0;
var ind_Especial = 0;
var ind_slim = 0;
var ind_SlimFornecedor = 0;
var ind_full = 0;
var ind_mega = 0;
var ind_MegaFornecedor = 0;
var ind_large = 0;
var ind_LargeSeg = 0;
var ind_LargeInvest = 0;
var ind_Canais = 0;
var ind_HalfSeg = 0;
var ind_half = 0;
var ind_arma = -1;
var ind_POPUP = 0;
var ind_LateralTela	 = 0;
var ind_Rodape	 = 0;



/*Master e Slim tem um comando a mais, somente se um dia precisar usar lógico está aí :)
document.getElementById("BannerMaster").style.clip='rect(auto, auto, 60, auto)';
*/

var tempoMaster;
var tempoFloater;
var tempoFloaterArea;
var tempoEspecial;
var tempoSlim;
var tempoSlimFornecedor;
var tempoFull;
var tempoMega;
var tempoMegaFornecedor;
var tempoLarge;
var tempoLargeSeg;
var tempoLargeInvest;
var tempoHalf;
var tempoHalfSeg;
var TempScript;
TempScript = '';


	    function MudaBannerMaster(){

		 	setTimeout('MudaBannerMaster();', 45000);

				document.getElementById("BannerMaster").style.clip = 'rect(auto, auto, 80px, auto)';
			
		 	if (qtdMaster != -1) {

			    if (ind_master > qtdMaster){
				      ind_master = 0;
				}
				var linkMaster = '../../include/ViewBanner.asp?tipo=master&IDBanner=' + idMaster[ind_master] + '&IDContrato=' + idContratoMaster[ind_master] + '&IDProduto=' + idProdutoMaster[ind_master] + '&SeqProduto=' + seqProdutoMaster[ind_master];
				AjaxLink('gravaViewBannerMaster',linkMaster);

				if ((imagemMaster[ind_master].substring(imagemMaster[ind_master].length-3,imagemMaster[ind_master].length) != 'swf') && (imagemMaster[ind_master].substring(imagemMaster[ind_master].length-3,imagemMaster[ind_master].length) != 'd?x') ){
				      document.getElementById("BannerMaster").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idMaster[ind_master] +'&IDContrato='+ idContratoMaster[ind_master] +'&IDProduto='+ idProdutoMaster[ind_master] +'&SeqProduto='+ seqProdutoMaster[ind_master] +'&spath='+ linksMaster[ind_master] +'"><img src="'+ imagemMaster[ind_master] + '" height="'+ heightMaster +'" width="'+ widthMaster +'" border="0" ></a>';
				}
				if ((imagemMaster[ind_master].substring(imagemMaster[ind_master].length-3,imagemMaster[ind_master].length) == 'swf') || (imagemMaster[ind_master].substring(imagemMaster[ind_master].length-3,imagemMaster[ind_master].length) == 'd?x') ){
					document.getElementById("BannerMaster").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idMaster[ind_master] +'&IDContrato='+ idContratoMaster[ind_master] +'&IDProduto='+ idProdutoMaster[ind_master] +'&SeqProduto='+ seqProdutoMaster[ind_master] +'&spath='+ linksMaster[ind_master] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" id=ShockwaveFlash1 height="'+ heightMaster +'" width="'+ widthMaster +'"><param name=movie value="'+ imagemMaster[ind_master] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemMaster[ind_master] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthMaster +'" height="'+ heightMaster +'" WMODE="transparent"></embed></object></a>';
	 			}

				if (ScriptMaster[ind_master] == '1'){					
					if(TempScript != ''){
						document.getElementById('BannerMasterScript').innerHTML = TempScript;
					}
				    document.getElementById('BannerMasterScript').style.display = 'inline';					
				    document.getElementById('BannerMaster').style.display = 'none';					
					TempScript = '';
				}else{			
					TempScript = document.getElementById('BannerMasterScript').innerHTML;
					document.getElementById('BannerMasterScript').innerHTML = '';
				    document.getElementById('BannerMasterScript').style.display = 'none';
				    document.getElementById('BannerMaster').style.display = 'inline';				
				}
				
   		        ind_master += 1;
		    }
	    }
	    
	    function MudaBannerFloater(){

		 	//setTimeout('MudaBannerFloater();', 45000);

	        if (qtdFloater != -1) {
	    
			    if (ind_Floater > qtdFloater){
				      ind_Floater = 0;
				}

				var linkFloater = '../../include/ViewBanner.asp?tipo=floater&IDBanner=' + idFloater[ind_Floater] + '&IDContrato=' + idContratoFloater[ind_Floater] + '&IDProduto=' + idProdutoFloater[ind_Floater] + '&SeqProduto=' + seqProdutoFloater[ind_Floater];
	            AjaxLink('gravaViewBannerFloater', linkFloater);

				if (imagemFloater[ind_Floater].substring(imagemFloater[ind_Floater].length-3,imagemFloater[ind_Floater].length) != 'swf'){
				      document.getElementById("BannerFloater").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idFloater[ind_Floater] +'&IDContrato='+ idContratoFloater[ind_Floater] +'&IDProduto='+ idProdutoFloater[ind_Floater] +'&SeqProduto='+ seqProdutoFloater[ind_Floater] +'&spath='+ linksFloater[ind_Floater] +'"><img src="'+ imagemFloater[ind_Floater] + '" height="'+ heightFloater +'" width="'+ widthFloater +'" border="0" ></a>';
				}
			    if (imagemFloater[ind_Floater].substring(imagemFloater[ind_Floater].length-3,imagemFloater[ind_Floater].length) == 'swf'){
			          document.getElementById("BannerFloater").innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightFloater +'" width="'+ widthFloater +'"><param name=movie value="'+ imagemFloater[ind_Floater] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemFloater[ind_Floater] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthFloater +'" height="'+ heightFloater +'" wmode="transparent" ></embed></object>';
//			          document.getElementById("BannerFloater").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idFloater[ind_Floater] +'&IDContrato='+ idContratoFloater[ind_Floater] +'&IDProduto='+ idProdutoFloater[ind_Floater] +'&SeqProduto='+ seqProdutoFloater[ind_Floater] +'&spath='+ linksFloater[ind_Floater] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightFloater +'" width="'+ widthFloater +'"><param name=movie value="'+ imagemFloater[ind_Floater] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemFloater[ind_Floater] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthFloater +'" height="'+ heightFloater +'" wmode="transparent" ></embed></object></a>';
	 			}
   		        ind_Floater += 1;
		    }
	    }


	    function MudaBannerFloaterArea(){

		 	//setTimeout('MudaBannerFloater();', 45000);

	        if (qtdFloaterArea != -1) {
	    
			    if (ind_FloaterArea > qtdFloaterArea){
				      ind_FloaterArea = 0;
				}

				var linkFloaterArea = '../../include/ViewBanner.asp?tipo=floaterArea&IDBanner=' + idFloaterArea[ind_FloaterArea] + '&IDContrato=' + idContratoFloaterArea[ind_FloaterArea] + '&IDProduto=' + idProdutoFloaterArea[ind_FloaterArea] + '&SeqProduto=' + seqProdutoFloaterArea[ind_FloaterArea];
	            AjaxLink('gravaViewBannerFloaterArea', linkFloaterArea);

				if (imagemFloaterArea[ind_FloaterArea].substring(imagemFloaterArea[ind_FloaterArea].length-3,imagemFloaterArea[ind_FloaterArea].length) != 'swf'){
				      document.getElementById("BannerFloaterArea").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idFloaterArea[ind_FloaterArea] +'&IDContrato='+ idContratoFloaterArea[ind_FloaterArea] +'&IDProduto='+ idProdutoFloaterArea[ind_FloaterArea] +'&SeqProduto='+ seqProdutoFloaterArea[ind_FloaterArea] +'&spath='+ linksFloaterArea[ind_FloaterArea] +'"><img src="'+ imagemFloaterArea[ind_FloaterArea] + '" height="'+ heightFloaterArea +'" width="'+ widthFloaterArea +'" border="0" ></a>';
				}
			    if (imagemFloaterArea[ind_FloaterArea].substring(imagemFloaterArea[ind_FloaterArea].length-3,imagemFloaterArea[ind_FloaterArea].length) == 'swf'){
			          document.getElementById("BannerFloaterArea").innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightFloaterArea +'" width="'+ widthFloaterArea +'"><param name=movie value="'+ imagemFloaterArea[ind_FloaterArea] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemFloaterArea[ind_FloaterArea] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthFloaterArea +'" height="'+ heightFloaterArea +'" wmode="transparent" ></embed></object>';
//			          document.getElementById("BannerFloater").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idFloater[ind_Floater] +'&IDContrato='+ idContratoFloater[ind_Floater] +'&IDProduto='+ idProdutoFloater[ind_Floater] +'&SeqProduto='+ seqProdutoFloater[ind_Floater] +'&spath='+ linksFloater[ind_Floater] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightFloater +'" width="'+ widthFloater +'"><param name=movie value="'+ imagemFloater[ind_Floater] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemFloater[ind_Floater] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthFloater +'" height="'+ heightFloater +'" wmode="transparent" ></embed></object></a>';
	 			}
   		        ind_FloaterArea += 1;
		    }

	    }


	    function MudaBannerPOPUP(){

	        if (qtdPOPUP != -1) {
	    
			    if (ind_POPUP > qtdPOPUP){
				      ind_POPUP = 0;
				}
				today = new Date();
				num = today.getTime(); 
			    window.open( "../../include/PopupBanner.asp?dfdata_hora=" +today+num+'&IDBanner=' + idPOPUP[ind_POPUP] +'&IDContrato=' + idContratoPOPUP[ind_POPUP] + '&IDProduto=' + idProdutoPOPUP[ind_POPUP] + '&SeqProduto=' + seqProdutoPOPUP[ind_POPUP],'','top=400,left=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,menubar=no,width='+ widthPOPUP+',height='+ heightPOPUP);

   		        ind_POPUP += 1;
		    }
	    }



	    function MudaBannerEspecial(){

		 	setTimeout('MudaBannerEspecial();', 45000);

			if (!IE8){		 
	        	document.getElementById("BannerEspecial").style.clip='rect(auto, auto, 60, auto)';
			}
			
	        if (qtdEspecial != -1) {

            		    
			    if (ind_Especial > qtdEspecial){
				      ind_Especial = 0;
				}

	            var linkEspecial = '../../include/ViewBanner.asp?tipo=especial&IDBanner=' + idEspecial[ind_Especial] + '&IDContrato=' + idContratoEspecial[ind_Especial] + '&IDProduto=' + idProdutoEspecial[ind_Especial] + '&SeqProduto=' + seqProdutoEspecial[ind_Especial];
	            AjaxLink('gravaViewBannerEspecial', linkEspecial);


				if (imagemEspecial[ind_Especial].substring(imagemEspecial[ind_Especial].length-3,imagemEspecial[ind_Especial].length) != 'swf'){
				      document.getElementById("BannerEspecial").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idEspecial[ind_Especial] +'&IDContrato='+ idContratoEspecial[ind_Especial] +'&IDProduto='+ idProdutoEspecial[ind_Especial] +'&SeqProduto='+ seqProdutoEspecial[ind_Especial] +'&spath='+ linksEspecial[ind_Especial] +'"><img src="'+ imagemEspecial[ind_Especial] + '" height="'+ heightEspecial +'" width="'+ widthEspecial +'" border="0" ></a>';
				}
			    if (imagemEspecial[ind_Especial].substring(imagemEspecial[ind_Especial].length-3,imagemEspecial[ind_Especial].length) == 'swf'){
	 			      document.getElementById("BannerEspecial").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idEspecial[ind_Especial] +'&IDContrato='+ idContratoEspecial[ind_Especial] +'&IDProduto='+ idProdutoEspecial[ind_Especial] +'&SeqProduto='+ seqProdutoEspecial[ind_Especial] +'&spath='+ linksEspecial[ind_Especial] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightEspecial +'" width="'+ widthEspecial +'"><param name=movie value="'+ imagemEspecial[ind_Especial] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemEspecial[ind_Especial] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthEspecial +'" height="'+ heightEspecial +'" wmode="transparent" ></embed></object></a>';
	 			}
				
				if (ScriptEspecial[ind_Especial] == '1'){
				    document.getElementById('BannerEspecialScript').style.display = 'inline';					
				    document.getElementById('BannerEspecial').style.display = 'none';					
				}else{
				    document.getElementById('BannerEspecialScript').style.display = 'none';
				    document.getElementById('BannerEspecial').style.display = 'inline';					
				}
				
   		        ind_Especial += 1;
		    }
	    }

	    function MudaBannerSlim(){

		 setTimeout('MudaBannerSlim();', 45000);

	        document.getElementById("BannerSlim").style.clip='rect(auto, auto, 50px, auto)';
	        if (qtdSlim != -1) {
            
			    if (ind_slim > qtdSlim){
				      ind_slim = 0;
				}

				var linkSlim = '../../include/ViewBanner.asp?tipo=slim&IDBanner=' + idSlim[ind_slim] + '&IDContrato=' + idContratoSlim[ind_slim] + '&IDProduto=' + idProdutoSlim[ind_slim] + '&SeqProduto=' + seqProdutoSlim[ind_slim];
	            AjaxLink('gravaViewBannerSlim', linkSlim);		    

				if (imagemSlim[ind_slim].substring(imagemSlim[ind_slim].length-3,imagemSlim[ind_slim].length) != 'swf'){
				      document.getElementById("BannerSlim").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idSlim[ind_slim] +'&IDContrato='+ idContratoSlim[ind_slim] +'&IDProduto='+ idProdutoSlim[ind_slim] +'&SeqProduto='+ seqProdutoSlim[ind_slim] +'&spath='+ linksSlim[ind_slim] +'"><img src="'+ imagemSlim[ind_slim] + '" height="'+ heightSlim +'" width="'+ widthSlim +'" border="0" ></a>';
				}
			    if (imagemSlim[ind_slim].substring(imagemSlim[ind_slim].length-3,imagemSlim[ind_slim].length) == 'swf'){
	 			      document.getElementById("BannerSlim").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idSlim[ind_slim] +'&IDContrato='+ idContratoSlim[ind_slim] +'&IDProduto='+ idProdutoSlim[ind_slim] +'&SeqProduto='+ seqProdutoSlim[ind_slim] +'&spath='+ linksSlim[ind_slim] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightSlim +'" width="'+ widthSlim +'"><param name=movie value="'+ imagemSlim[ind_slim] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemSlim[ind_slim] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthSlim +'" height="'+ heightSlim +'" wmode="transparent" ></embed></object></a>';
	 			}
   		        ind_slim += 1;
		    }
	    }
	    
	    function MudaBannerSlimFornecedor(){

		 setTimeout('MudaBannerSlimFornecedor();', 45000);

	        document.getElementById("BannerSlimFornecedor").style.clip='rect(auto, auto, 30px, auto)';
	        if (qtdSlimFornecedor != -1) {
	    
			    if (ind_SlimFornecedor > qtdSlimFornecedor){
				      ind_SlimFornecedor = 0;
				}

	            var linkSlimFornecedor = '../../include/ViewBanner.asp?tipo=slimfornecedor&IDBanner=' + idSlimFornecedor[ind_SlimFornecedor] + '&IDContrato=' + idContratoSlimFornecedor[ind_SlimFornecedor] + '&IDProduto=' + idProdutoSlimFornecedor[ind_SlimFornecedor] + '&SeqProduto=' + seqProdutoSlimFornecedor[ind_SlimFornecedor];
	            AjaxLink('gravaViewBannerSlimFornecedor', linkSlimFornecedor);

				if (imagemSlimFornecedor[ind_SlimFornecedor].substring(imagemSlimFornecedor[ind_SlimFornecedor].length-3,imagemSlimFornecedor[ind_SlimFornecedor].length) != 'swf'){
				      document.getElementById("BannerSlimFornecedor").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idSlimFornecedor[ind_SlimFornecedor] +'&IDContrato='+ idContratoSlimFornecedor[ind_SlimFornecedor] +'&IDProduto='+ idProdutoSlimFornecedor[ind_SlimFornecedor] +'&SeqProduto='+ seqProdutoSlimFornecedor[ind_SlimFornecedor] +'&spath='+ linksSlimFornecedor[ind_SlimFornecedor] +'"><img src="'+ imagemSlimFornecedor[ind_SlimFornecedor] + '" height="'+ heightSlimFornecedor +'" width="'+ widthSlimFornecedor +'" border="0" ></a>';
				}
			    if (imagemSlimFornecedor[ind_SlimFornecedor].substring(imagemSlimFornecedor[ind_SlimFornecedor].length-3,imagemSlimFornecedor[ind_SlimFornecedor].length) == 'swf'){
					document.getElementById("BannerSlimFornecedor").innerHTML= '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idSlimFornecedor[ind_SlimFornecedor] +'&IDContrato='+ idContratoSlimFornecedor[ind_SlimFornecedor] +'&IDProduto='+ idProdutoSlimFornecedor[ind_SlimFornecedor] +'&SeqProduto='+ seqProdutoSlimFornecedor[ind_SlimFornecedor] +'&spath='+ linksSlimFornecedor[ind_SlimFornecedor] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightSlimFornecedor +'" width="'+ widthSlimFornecedor +'"><param name=movie value="'+ imagemSlimFornecedor[ind_SlimFornecedor] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemSlimFornecedor[ind_SlimFornecedor] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthSlimFornecedor +'" height="'+ heightSlimFornecedor +'" WMODE="transparent"></embed></object></a>';
	 			}




				ind_SlimFornecedor += 1;
		    }
	    }

	    function MudaBannerFull(){

		 setTimeout('MudaBannerFull();', 45000);

		    if (qtdFull != -1) {
	     
			    if (ind_full > qtdFull){
				      ind_full = 0;
				}
				
		        var linkFull = '../../include/ViewBanner.asp?tipo=full&IDBanner=' + idFull[ind_full] + '&IDContrato=' + idContratoFull[ind_full] + '&IDProduto=' + idProdutoFull[ind_full] + '&SeqProduto=' + seqProdutoFull[ind_full];
		     	AjaxLink('gravaViewBannerFull', linkFull);
				
			    if ((imagemFull[ind_full].substring(imagemFull[ind_full].length-3,imagemFull[ind_full].length) != 'swf') && (imagemFull[ind_full].substring(imagemFull[ind_full].length-3,imagemFull[ind_full].length) != 'd?x')){
				      document.getElementById("BannerFull").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idFull[ind_full] +'&IDContrato='+ idContratoFull[ind_full] +'&IDProduto='+ idProdutoFull[ind_full] +'&SeqProduto='+ seqProdutoFull[ind_full] +'&spath='+ linksFull[ind_full] +'"><img src="'+ imagemFull[ind_full] + '" height="'+ heightFull +'" width="'+ widthFull +'" border="0" ></a>';
				}
			    if ((imagemFull[ind_full].substring(imagemFull[ind_full].length-3,imagemFull[ind_full].length) == 'swf') || (imagemFull[ind_full].substring(imagemFull[ind_full].length-3,imagemFull[ind_full].length) == 'd?x')){
	 			      document.getElementById("BannerFull").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idFull[ind_full] +'&IDContrato='+ idContratoFull[ind_full] +'&IDProduto='+ idProdutoFull[ind_full] +'&SeqProduto='+ seqProdutoFull[ind_full] +'&spath='+ linksFull[ind_full] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" id=ShockwaveFlash1 height="'+ heightFull +'" width="'+ widthFull +'"><param name=movie value="'+ imagemFull[ind_full] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemFull[ind_full] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthFull +'" height="'+ heightFull +'" wmode="transparent" ></embed></object></a>';
	 			}
				
				if (ScriptFull[ind_full] == '1'){
				    document.getElementById('BannerFullScript').style.display = 'inline';					
				    document.getElementById('BannerFull').style.display = 'none';					
				}else{
				    document.getElementById('BannerFullScript').style.display = 'none';
				    document.getElementById('BannerFull').style.display = 'inline';					
				}
				
   		        ind_full += 1;
		    }
	    }
	    
	    function MudaBannerMega(){

		 setTimeout('MudaBannerMega();', 45000);

		     if (qtdMega != -1) {

		    
			    if (ind_mega > qtdMega){
				      ind_mega = 0;
				}
				
		         var linkMega = '../../include/ViewBanner.asp?tipo=mega&IDBanner=' + idMega[ind_mega] + '&IDContrato=' + idContratoMega[ind_mega] + '&IDProduto=' + idProdutoMega[ind_mega] + '&SeqProduto=' + seqProdutoMega[ind_mega];
		         AjaxLink('gravaViewBannerMega', linkMega);				
				
			    if (imagemMega[ind_mega].substring(imagemMega[ind_mega].length-3,imagemMega[ind_mega].length) != 'swf'){
				      document.getElementById("BannerMega").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idMega[ind_mega] +'&IDContrato='+ idContratoMega[ind_mega] +'&IDProduto='+ idProdutoMega[ind_mega] +'&SeqProduto='+ seqProdutoMega[ind_mega] +'&spath='+ linksMega[ind_mega] +'"><img src="'+ imagemMega[ind_mega] + '" height="'+ heightMega +'" width="'+ widthMega +'" border="0" ></a>';
				}
			    if (imagemMega[ind_mega].substring(imagemMega[ind_mega].length-3,imagemMega[ind_mega].length) == 'swf'){
	 			      document.getElementById("BannerMega").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idMega[ind_mega] +'&IDContrato='+ idContratoMega[ind_mega] +'&IDProduto='+ idProdutoMega[ind_mega] +'&SeqProduto='+ seqProdutoMega[ind_mega] +'&spath='+ linksMega[ind_mega] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightMega +'" width="'+ widthMega +'"><param name=movie value="'+ imagemMega[ind_mega] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemMega[ind_mega] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthMega +'" height="'+ heightMega +'" wmode="transparent" ></embed></object></a>';
	 			}
   		        ind_mega += 1;
		    }
	    }

	    function MudaBannerMegaFornecedor(){

		 setTimeout('MudaBannerMegaFornecedor();', 45000);

		     if (qtdMegaFornecedor != -1) {
	    
			    if (ind_MegaFornecedor > qtdMegaFornecedor){
				      ind_MegaFornecedor = 0;
				}
				
				 var linkFornecedor = '../../include/ViewBanner.asp?tipo=megafornecedor&IDBanner=' + idMegaFornecedor[ind_MegaFornecedor] + '&IDContrato=' + idContratoMegaFornecedor[ind_MegaFornecedor] + '&IDProduto=' + idProdutoMegaFornecedor[ind_MegaFornecedor] + '&SeqProduto=' + seqProdutoMegaFornecedor[ind_MegaFornecedor];
				 AjaxLink('gravaViewBannerMegaFornecedor', linkFornecedor);
				
				
			    if (imagemMegaFornecedor[ind_MegaFornecedor].substring(imagemMegaFornecedor[ind_MegaFornecedor].length-3,imagemMegaFornecedor[ind_MegaFornecedor].length) != 'swf'){
				      document.getElementById("BannerMegaFornecedor").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idMegaFornecedor[ind_MegaFornecedor] +'&IDContrato='+ idContratoMegaFornecedor[ind_MegaFornecedor] +'&IDProduto='+ idProdutoMegaFornecedor[ind_MegaFornecedor] +'&SeqProduto='+ seqProdutoMegaFornecedor[ind_MegaFornecedor] +'&spath='+ linksMegaFornecedor[ind_MegaFornecedor] +'"><img src="'+ imagemMegaFornecedor[ind_MegaFornecedor] + '" height="'+ heightMegaFornecedor +'" width="'+ widthMegaFornecedor +'" border="0" ></a>';
				}
			    if (imagemMegaFornecedor[ind_MegaFornecedor].substring(imagemMegaFornecedor[ind_MegaFornecedor].length-3,imagemMegaFornecedor[ind_MegaFornecedor].length) == 'swf'){
	 			      document.getElementById("BannerMegaFornecedor").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idMegaFornecedor[ind_MegaFornecedor] +'&IDContrato='+ idContratoMegaFornecedor[ind_MegaFornecedor] +'&IDProduto='+ idProdutoMegaFornecedor[ind_MegaFornecedor] +'&SeqProduto='+ seqProdutoMegaFornecedor[ind_MegaFornecedor] +'&spath='+ linksMegaFornecedor[ind_MegaFornecedor] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightMegaFornecedor +'" width="'+ widthMegaFornecedor +'"><param name=movie value="'+ imagemMegaFornecedor[ind_MegaFornecedor] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemMegaFornecedor[ind_MegaFornecedor] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthMegaFornecedor +'" height="'+ heightMegaFornecedor +'" wmode="transparent" ></embed></object></a>';
	 			}
   		        ind_MegaFornecedor += 1;
		    }
	    }

	    function MudaBannerLarge(){

		 setTimeout('MudaBannerLarge();', 45000);

		    if (qtdLarge != -1) {

		    
			    if (ind_large > qtdLarge){
				      ind_large = 0;
				}
				
		        var linkLarge = '../../include/ViewBanner.asp?tipo=large&IDBanner=' + idLarge[ind_large] + '&IDContrato=' + idContratoLarge[ind_large] + '&IDProduto=' + idProdutoLarge[ind_large] + '&SeqProduto=' + seqProdutoLarge[ind_large];
			    AjaxLink('gravaViewBannerLarge', linkLarge);
				
			    if (imagemLarge[ind_large].substring(imagemLarge[ind_large].length-3,imagemLarge[ind_large].length) != 'swf'){
				      document.getElementById("BannerLarge").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idLarge[ind_large] +'&IDContrato='+ idContratoLarge[ind_large] +'&IDProduto='+ idProdutoLarge[ind_large] +'&SeqProduto='+ seqProdutoLarge[ind_large] +'&spath='+ linksLarge[ind_large] +'"><img src="'+ imagemLarge[ind_large] + '" height="'+ heightLarge +'" width="'+ widthLarge +'" border="0" ></a>';
				}
			    if (imagemLarge[ind_large].substring(imagemLarge[ind_large].length-3,imagemLarge[ind_large].length) == 'swf'){
	 			      document.getElementById("BannerLarge").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idLarge[ind_large] +'&IDContrato='+ idContratoLarge[ind_large] +'&IDProduto='+ idProdutoLarge[ind_large] +'&SeqProduto='+ seqProdutoLarge[ind_large] +'&spath='+ linksLarge[ind_large] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightLarge +'" width="'+ widthLarge +'"><param name=movie value="'+ imagemLarge[ind_large] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemLarge[ind_large] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthLarge +'" height="'+ heightLarge +'" wmode="transparent" ></embed></object></a>';
	 			}
   		        ind_large += 1;
		    }
	    }
	    
	    function MudaBannerLargeSeg(){

		 setTimeout('MudaBannerLargeSeg();', 45000);

		    if (qtdLargeSeg != -1) {

	    
			    if (ind_LargeSeg > qtdLargeSeg){
				      ind_LargeSeg = 0;
				}
				
		        var linkLargeSeg = '../../include/ViewBanner.asp?tipo=largeseg&IDBanner=' + idLargeSeg[ind_LargeSeg] + '&IDContrato=' + idContratoLargeSeg[ind_LargeSeg] + '&IDProduto=' + idProdutoLargeSeg[ind_LargeSeg] + '&SeqProduto=' + seqProdutoLargeSeg[ind_LargeSeg];
		    	AjaxLink('gravaViewBannerLargeSeg', linkLargeSeg);				
				
			    if (imagemLargeSeg[ind_LargeSeg].substring(imagemLargeSeg[ind_LargeSeg].length-3,imagemLargeSeg[ind_LargeSeg].length) != 'swf'){
				      document.getElementById("BannerLargeSeg").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idLargeSeg[ind_LargeSeg] +'&IDContrato='+ idContratoLargeSeg[ind_LargeSeg] +'&IDProduto='+ idProdutoLargeSeg[ind_LargeSeg] +'&SeqProduto='+ seqProdutoLargeSeg[ind_LargeSeg] +'&spath='+ linksLargeSeg[ind_LargeSeg] +'"><img src="'+ imagemLargeSeg[ind_LargeSeg] + '" height="'+ heightLargeSeg +'" width="'+ widthLargeSeg +'" border="0" ></a>';
				}
			    if (imagemLargeSeg[ind_LargeSeg].substring(imagemLargeSeg[ind_LargeSeg].length-3,imagemLargeSeg[ind_LargeSeg].length) == 'swf'){
	 			      document.getElementById("BannerLargeSeg").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idLargeSeg[ind_LargeSeg] +'&IDContrato='+ idContratoLargeSeg[ind_LargeSeg] +'&IDProduto='+ idProdutoLargeSeg[ind_LargeSeg] +'&SeqProduto='+ seqProdutoLargeSeg[ind_LargeSeg] +'&spath='+ linksLargeSeg[ind_LargeSeg] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightLargeSeg +'" width="'+ widthLargeSeg +'"><param name=movie value="'+ imagemLargeSeg[ind_LargeSeg] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemLargeSeg[ind_LargeSeg] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthLargeSeg +'" height="'+ heightLargeSeg +'" wmode="transparent" ></embed></object></a>';
	 			}
   		        ind_LargeSeg += 1;
		    }
	    }

	    function MudaBannerLargeInvest(){

		 setTimeout('MudaBannerLargeInvest();', 45000);

		    if (qtdLargeInvest != -1) {

	    
			    if (ind_LargeInvest > qtdLargeInvest){
				      ind_LargeInvest = 0;
				}
				
		        var linkLargeInvest = '../../include/ViewBanner.asp?tipo=LargeInvest&IDBanner=' + idLargeInvest[ind_LargeInvest] + '&IDContrato=' + idContratoLargeInvest[ind_LargeInvest] + '&IDProduto=' + idProdutoLargeInvest[ind_LargeInvest] + '&SeqProduto=' + seqProdutoLargeInvest[ind_LargeInvest];
		    	AjaxLink('gravaViewBannerLargeInvest', linkLargeInvest);				
				
			    if (imagemLargeInvest[ind_LargeInvest].substring(imagemLargeInvest[ind_LargeInvest].length-3,imagemLargeInvest[ind_LargeInvest].length) != 'swf'){
				      document.getElementById("BannerLargeInvest").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idLargeInvest[ind_LargeInvest] +'&IDContrato='+ idContratoLargeInvest[ind_LargeInvest] +'&IDProduto='+ idProdutoLargeInvest[ind_LargeInvest] +'&SeqProduto='+ seqProdutoLargeInvest[ind_LargeInvest] +'&spath='+ linksLargeInvest[ind_LargeInvest] +'"><img src="'+ imagemLargeInvest[ind_LargeInvest] + '" height="'+ heightLargeInvest +'" width="'+ widthLargeInvest +'" border="0" ></a>';
				}
			    if (imagemLargeInvest[ind_LargeInvest].substring(imagemLargeInvest[ind_LargeInvest].length-3,imagemLargeInvest[ind_LargeInvest].length) == 'swf'){
	 			      document.getElementById("BannerLargeInvest").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idLargeInvest[ind_LargeInvest] +'&IDContrato='+ idContratoLargeInvest[ind_LargeInvest] +'&IDProduto='+ idProdutoLargeInvest[ind_LargeInvest] +'&SeqProduto='+ seqProdutoLargeInvest[ind_LargeInvest] +'&spath='+ linksLargeInvest[ind_LargeInvest] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightLargeInvest +'" width="'+ widthLargeInvest +'"><param name=movie value="'+ imagemLargeInvest[ind_LargeInvest] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemLargeInvest[ind_LargeInvest] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthLargeInvest +'" height="'+ heightLargeInvest +'" wmode="transparent" ></embed></object></a>';
	 			}
   		        ind_LargeInvest += 1;
		    }
	    }

	    function MudaBannerCanais(){

		 setTimeout('MudaBannerCanais();', 45000);

		    if (qtdCanais != -1) {

	    
			    if (ind_Canais > qtdCanais){
				      ind_Canais = 0;
				}

				var linkCanais = '../../include/ViewBanner.asp?tipo=canais&IDBanner=' + idCanais[ind_Canais] + '&IDContrato=' + idContratoCanais[ind_Canais] + '&IDProduto=' + idProdutoCanais[ind_Canais] + '&SeqProduto=' + seqProdutoCanais[ind_Canais];
			    AjaxLink('gravaViewBannerCanais', linkCanais);

				if (imagemCanais[ind_Canais].substring(imagemCanais[ind_Canais].length-3,imagemCanais[ind_Canais].length) != 'swf'){
				      document.getElementById("BannerCanais").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idCanais[ind_Canais	] +'&IDContrato='+ idContratoCanais[ind_Canais	] +'&IDProduto='+ idProdutoCanais[ind_Canais	] +'&SeqProduto='+ seqProdutoCanais[ind_Canais	] +'&spath='+ linksCanais[ind_Canais	] +'"><img src="'+ imagemCanais[ind_Canais	] + '" height="'+ heightCanais +'" width="'+ widthCanais +'" border="0" ></a>';
				}
			    if (imagemCanais[ind_Canais].substring(imagemCanais[ind_Canais].length-3,imagemCanais[ind_Canais].length) == 'swf'){
					if(typeof(document.getElementById("BannerCanais")) != 'undefined'){
						document.getElementById("BannerCanais").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idCanais[ind_Canais	] +'&IDContrato='+ idContratoCanais[ind_Canais	] +'&IDProduto='+ idProdutoCanais[ind_Canais	] +'&SeqProduto='+ seqProdutoCanais[ind_Canais	] +'&spath='+ linksCanais[ind_Canais	] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightCanais +'" width="'+ widthCanais +'"><param name=movie value="'+ imagemCanais[ind_Canais	] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemCanais[ind_Canais	] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthCanais +'" height="'+ heightCanais +'" wmode="transparent" ></embed></object></a>';
					}else{
						document.getElementById("BannerCanais").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idCanais[ind_Canais	] +'&IDContrato='+ idContratoCanais[ind_Canais	] +'&IDProduto='+ idProdutoCanais[ind_Canais	] +'&SeqProduto='+ seqProdutoCanais[ind_Canais	] +'&spath='+ linksCanais[ind_Canais	] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightCanais +'" width="'+ widthCanais +'"><param name=movie value="'+ imagemCanais[ind_Canais	] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemCanais[ind_Canais	] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthCanais +'" height="'+ heightCanais +'" wmode="transparent" ></embed></object></a>';					
					}
	 			}
   		        ind_Canais	 += 1;
		    }
	    }

	    function MudaBannerHalfSeg(){

		 setTimeout('MudaBannerHalfSeg();', 45000);

		    if (qtdHalfSeg != -1) {
	    
			    if (ind_HalfSeg > qtdHalfSeg){
				      ind_HalfSeg = 0;
				}
				
		        var linkHalfSeg = '../../include/ViewBanner.asp?tipo=halfseg&IDBanner=' + idHalfSeg[ind_HalfSeg] + '&IDContrato=' + idContratoHalfSeg[ind_HalfSeg] + '&IDProduto=' + idProdutoHalfSeg[ind_HalfSeg] + '&SeqProduto=' + seqProdutoHalfSeg[ind_HalfSeg];
			     AjaxLink('gravaViewBannerHalfSeg', linkHalfSeg);
				
			    if (imagemHalfSeg[ind_HalfSeg].substring(imagemHalfSeg[ind_HalfSeg].length-3,imagemHalfSeg[ind_HalfSeg].length) != 'swf'){
				      document.getElementById("BannerHalfSeg").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idHalfSeg[ind_HalfSeg	] +'&IDContrato='+ idContratoHalfSeg[ind_HalfSeg	] +'&IDProduto='+ idProdutoHalfSeg[ind_HalfSeg	] +'&SeqProduto='+ seqProdutoHalfSeg[ind_HalfSeg	] +'&spath='+ linksHalfSeg[ind_HalfSeg	] +'"><img src="'+ imagemHalfSeg[ind_HalfSeg	] + '" height="'+ heightHalfSeg +'" width="'+ widthHalfSeg +'" border="0" ></a>';
				}
			    if (imagemHalfSeg[ind_HalfSeg].substring(imagemHalfSeg[ind_HalfSeg].length-3,imagemHalfSeg[ind_HalfSeg].length) == 'swf'){
	 			      document.getElementById("BannerHalfSeg").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idHalfSeg[ind_HalfSeg	] +'&IDContrato='+ idContratoHalfSeg[ind_HalfSeg	] +'&IDProduto='+ idProdutoHalfSeg[ind_HalfSeg	] +'&SeqProduto='+ seqProdutoHalfSeg[ind_HalfSeg	] +'&spath='+ linksHalfSeg[ind_HalfSeg	] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightHalfSeg +'" width="'+ widthHalfSeg +'"><param name=movie value="'+ imagemHalfSeg[ind_HalfSeg	] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemHalfSeg[ind_HalfSeg	] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthHalfSeg +'" height="'+ heightHalfSeg +'" wmode="transparent" ></embed></object></a>';
	 			}
   		        ind_HalfSeg	 += 1;
		    }
	    }


	function MudaBannerHalf(){

		setTimeout('MudaBannerHalf();', 45000);
		
		    if (qtdHalf != -1 ){

		    for (j = 0; j < 3; j++) {
	        			
				if((ind_arma == qtdHalf) || (ind_arma==-1)){
					for (k=0;k<qtdHalf;k++){
						armazena[k] = -1;
					}
					ind_arma = 0;
				}
				//Gera o número aleatório
				ind_half = Math.floor(Math.random() * (Math.round(qtdHalf)+1));
				for (k=0;k<qtdHalf;k++){
					if (ind_half == armazena[k]){
						ind_half = Math.floor(Math.random() * (Math.round(qtdHalf)+1));
						k=-1;
					}
				}
				var linkHalf = '../../include/ViewBanner.asp?tipo=half'+ j +'&IDBanner=' + idHalf[ind_half] + '&IDContrato=' + idContratoHalf[ind_half] + '&IDProduto=' + idProdutoHalf[ind_half] + '&SeqProduto=' + seqProdutoHalf[ind_half];
		        AjaxLink('gravaViewBannerHalf' + j, linkHalf);

				armazena[ind_arma] = ind_half;
				ind_arma = ind_arma + 1;
//ind_half = 23;

				if (j == 0){
					if (imagemHalf[ind_half].substring(imagemHalf[ind_half].length-3,imagemHalf[ind_half].length) != 'swf'){
						document.getElementById("BannerHalf").innerHTML = '<div class="halfBanner"><a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idHalf[ind_half] +'&IDContrato='+ idContratoHalf[ind_half] +'&IDProduto='+ idProdutoHalf[ind_half] +'&SeqProduto='+ seqProdutoHalf[ind_half] +'&spath='+ linksHalf[ind_half] +'"><img src="'+ imagemHalf[ind_half] + '" height="'+ heightHalf +'" width="'+ widthHalf +'" border="0" ></a></div>'; 
					}
					if (imagemHalf[ind_half].substring(imagemHalf[ind_half].length-3,imagemHalf[ind_half].length) == 'swf'){
						document.getElementById("BannerHalf").innerHTML = '<div class="halfBanner"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightHalf +'" width="'+ widthHalf +'"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name=movie value="'+ imagemHalf[ind_half] +'" ><param name="quality" value="high"><embed src="'+ imagemHalf[ind_half] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthHalf +'" height="'+ heightHalf +'"  allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" ></embed></object></div>';	
					}
				}else{
				
					if (imagemHalf[ind_half].substring(imagemHalf[ind_half].length-3,imagemHalf[ind_half].length) != 'swf'){
						document.getElementById("BannerHalf").innerHTML += '<div class="halfBanner"><a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idHalf[ind_half] +'&IDContrato='+ idContratoHalf[ind_half] +'&IDProduto='+ idProdutoHalf[ind_half] +'&SeqProduto='+ seqProdutoHalf[ind_half] +'&spath='+ linksHalf[ind_half] +'"><img src="'+ imagemHalf[ind_half] + '" height="'+ heightHalf +'" width="'+ widthHalf +'" border="0" ></a></div>'; 
					}
					if (imagemHalf[ind_half].substring(imagemHalf[ind_half].length-3,imagemHalf[ind_half].length) == 'swf'){
						document.getElementById("BannerHalf").innerHTML += '<div class="halfBanner"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightHalf +'" width="'+ widthHalf +'"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name=movie value="'+ imagemHalf[ind_half] +'" ><param name="quality" value="high"><embed src="'+ imagemHalf[ind_half] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthHalf +'" height="'+ heightHalf +'"  allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" ></embed></object></div>';
					}
				}
			}
		}
	}
	
	    function MudaBannerLateralTela(){

		 setTimeout('MudaBannerLateralTela();', 45000);

		    if (qtdLateralTela != -1) {
	    
			    if (ind_LateralTela > qtdLateralTela){
				      ind_LateralTela = 0;
				}
				
		        var linkLateralTela = '../../include/ViewBanner.asp?tipo=LateralTela&IDBanner=' + idLateralTela[ind_LateralTela] + '&IDContrato=' + idContratoLateralTela[ind_LateralTela] + '&IDProduto=' + idProdutoLateralTela[ind_LateralTela] + '&SeqProduto=' + seqProdutoLateralTela[ind_LateralTela];
			     AjaxLink('gravaViewBannerLateralTela', linkLateralTela);
				
			    if (imagemLateralTela[ind_LateralTela].substring(imagemLateralTela[ind_LateralTela].length-3,imagemLateralTela[ind_LateralTela].length) != 'swf'){
				      document.getElementById("BannerLateralTela").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idLateralTela[ind_LateralTela	] +'&IDContrato='+ idContratoLateralTela[ind_LateralTela	] +'&IDProduto='+ idProdutoLateralTela[ind_LateralTela	] +'&SeqProduto='+ seqProdutoLateralTela[ind_LateralTela	] +'&spath='+ linksLateralTela[ind_LateralTela	] +'"><img src="'+ imagemLateralTela[ind_LateralTela	] + '" height="'+ heightLateralTela +'" width="'+ widthLateralTela +'" border="0" ></a>';
				}
			    if (imagemLateralTela[ind_LateralTela].substring(imagemLateralTela[ind_LateralTela].length-3,imagemLateralTela[ind_LateralTela].length) == 'swf'){
	 			      document.getElementById("BannerLateralTela").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idLateralTela[ind_LateralTela	] +'&IDContrato='+ idContratoLateralTela[ind_LateralTela	] +'&IDProduto='+ idProdutoLateralTela[ind_LateralTela	] +'&SeqProduto='+ seqProdutoLateralTela[ind_LateralTela	] +'&spath='+ linksLateralTela[ind_LateralTela	] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightLateralTela +'" width="'+ widthLateralTela +'"><param name=movie value="'+ imagemLateralTela[ind_LateralTela	] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemLateralTela[ind_LateralTela	] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthLateralTela +'" height="'+ heightLateralTela +'" wmode="transparent" ></embed></object></a>';
	 			}				
				
				if (ScriptLateralTela[ind_LateralTela] == '1'){
				    document.getElementById('BannerLateralTelaScript').style.display = 'inline';					
				    document.getElementById('BannerLateralTela').style.display = 'none';					
				}else{
				    document.getElementById('BannerLateralTelaScript').style.display = 'none';
				    document.getElementById('BannerLateralTela').style.display = 'inline';					
				}

				ind_LateralTela	 += 1;
				
				
		    }
	    }


	    function MudaBannerRodape(){

		 setTimeout('MudaBannerRodape();', 45000);

		    if (qtdRodape != -1) {
	    
			    if (ind_Rodape > qtdRodape){
				      ind_Rodape = 0;
				}
				
		        var linkRodape = '../../include/ViewBanner.asp?tipo=Rodape&IDBanner=' + idRodape[ind_Rodape] + '&IDContrato=' + idContratoRodape[ind_Rodape] + '&IDProduto=' + idProdutoRodape[ind_Rodape] + '&SeqProduto=' + seqProdutoRodape[ind_Rodape];
			     AjaxLink('gravaViewBannerRodape', linkRodape);
				
			    if (imagemRodape[ind_Rodape].substring(imagemRodape[ind_Rodape].length-3,imagemRodape[ind_Rodape].length) != 'swf'){
				      document.getElementById("BannerRodape").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idRodape[ind_Rodape	] +'&IDContrato='+ idContratoRodape[ind_Rodape	] +'&IDProduto='+ idProdutoRodape[ind_Rodape	] +'&SeqProduto='+ seqProdutoRodape[ind_Rodape	] +'&spath='+ linksRodape[ind_Rodape	] +'"><img src="'+ imagemRodape[ind_Rodape	] + '" height="'+ heightRodape +'" width="'+ widthRodape +'" border="0" ></a>';
				}
			    if (imagemRodape[ind_Rodape].substring(imagemRodape[ind_Rodape].length-3,imagemRodape[ind_Rodape].length) == 'swf'){
	 			      document.getElementById("BannerRodape").innerHTML = '<a target="_blank" href="../../include/ClickBanner.asp?IDBanner='+ idRodape[ind_Rodape	] +'&IDContrato='+ idContratoRodape[ind_Rodape	] +'&IDProduto='+ idProdutoRodape[ind_Rodape	] +'&SeqProduto='+ seqProdutoRodape[ind_Rodape	] +'&spath='+ linksRodape[ind_Rodape	] +'"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id=ShockwaveFlash1 height="'+ heightRodape +'" width="'+ widthRodape +'"><param name=movie value="'+ imagemRodape[ind_Rodape	] +'" ><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ imagemRodape[ind_Rodape	] +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ widthRodape +'" height="'+ heightRodape +'" wmode="transparent" ></embed></object></a>';
	 			}

				if (ScriptRodape[ind_Rodape] == '1'){
				    document.getElementById('BannerRodapeScript').style.display = 'inline';					
				    document.getElementById('BannerRodape').style.display = 'none';					
				}else{
				    document.getElementById('BannerRodapeScript').style.display = 'none';
				    document.getElementById('BannerRodape').style.display = 'inline';					
				}

   		        ind_Rodape	 += 1;

		    }
	    }

