/* ****************************************************** */
// Função que faz o redirecionamento atraves de um clique em um combo
/* ****************************************************** */
function getStates(link,target)
{
 if (link.selectedIndex != '')
 {
  var _link = link.value;
  var _target = target;
  if(_target != '_top'){
    window.open(_link);
  }else{
	top.location.href = _link;
  }
 } 
}

/* ****************************************************** */
// Função de redirecionamento no onLoad="MM_goToURL('parent','http://www.radiointegracaoam1180.com.br/novo');return document.MM_returnValue" do <body>
/* ****************************************************** */
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments;
  document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2)
    eval(args[i]+".location='"+args[i+1]+"'");
}


/*****************************************************************************
 arquivo swfobject.js
*****************************************************************************/
// -->
/**
 * SWFObject v1.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
if(!document.createElement||!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.addParam("wmode","transparent");
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){
_16.push(key+"="+_18[key]);}
return _16;
},getSWFHTML:function(){
var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}
_19+="/>";
}else{
if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}
_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();
return true;
}else{
if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){
var _25=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{
var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
for(var i=3;axo!=null;i++){
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
_25=new deconcept.PlayerVersion([i,0,0]);}}
catch(e){}
if(_23&&_25.major>_23.major){return _25;}
if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){
try{_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}
catch(e){}}}
return _25;};
deconcept.PlayerVersion=function(_29){
this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0;
this.minor=parseInt(_29[1])||0;
this.rev=parseInt(_29[2])||0;};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){return false;}return true;};
deconcept.util={getRequestParameter:function(_2b){
var q=document.location.search||document.location.hash;
if(q){
var _2d=q.indexOf(_2b+"=");
var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length;
if(q.length>1&&_2d>-1){
return q.substring(q.indexOf("=",_2d)+1,_2e);
}}return "";}};
if(Array.prototype.push==null){
Array.prototype.push=function(_2f){
this[this.length]=_2f;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject; // for backwards compatibility
var SWFObject=deconcept.SWFObject;

/*****************************************************************************
 arquivo escreve no canal de noticias
*****************************************************************************/

var ticker_layer = false;
var step_time = 80;
var freeze_time = 2000;
var news_index = 0;
var title_index = 0;
var end_title = "_";
var title_max_size = 65;

if(!news){ var news = new Array(); }

for (var i=0;i<news.length-1;i++){
    t = news[i][0];
    t=t.replace(/\&quot;/gi,'"');
    t=t.replace(/\&amp;/gi,'&');
    t=t.replace(/\'/gi,'\'');
    if (t.length>title_max_size){
        t = t.substring( 0 , title_max_size );
        t=t.substring(0,t.lastIndexOf(' '));
        t+='...';
    }
    news[i][0]=t;
}

function begin_roll_ticker(){
    window.setTimeout( "roll_ticker()" , step_time );
}

function roll_ticker(){
    var title;
    if ( title_index == 0 ){
        while ( document.getElementById('ticker').lastChild != null ){
            child = document.getElementById('ticker').lastChild;
            document.getElementById('ticker').removeChild( child );
        }
    }

    if ( news.length > news_index + 1 && news[news_index][0].length >= title_index ){
        title = news[ news_index ];
        document.getElementById('ticker_anchor').setAttribute( "href" , title[1] );

        s_text = title[0].substring( title_index  , title_index + 1 );
        title_index++;

        if ( document.getElementById('ticker').lastChild != null ){
            if ( document.getElementById('ticker').lastChild.nodeValue == "_" ){
                child = document.getElementById('ticker').lastChild;
                document.getElementById('ticker').removeChild( child );
            }
        }

        txt = document.createTextNode( s_text );
        document.getElementById('ticker').appendChild( txt );

        if ( title[0].length > title_index ) {
            if ( title_index % 10 != 0 ){
                txt = document.createTextNode( "_" );
                document.getElementById('ticker').appendChild( txt );
            }
        }
        window.setTimeout( "roll_ticker()" , step_time );
    }
    else{
        news.length == news_index + 2 ? news_index = 0 : news_index++;
        title_index = 0;
        window.setTimeout( "roll_ticker()" , freeze_time );
    }
}

/*****************************************************************************
 arquivo Zoom + e -
*****************************************************************************/

<!--

	var ie4=document.all&&!document.getElementById
	var ns4
	var DOM2=document.getElementById

	if (ns4) document.write('<ilayer id="zoomerns"><layer id="zoomerns_sub" left=0 top=0></layer></ilayer>')

	var index=10
    var mais=1
    var menos=0

	/*	if (DOM2){
		document.getElementById("zoomer").style.fontSize=index*10+0+"%";
	}else */
	
	if (ie4){
		document.all.zoomer.style.fontSize=index*10+0+"%";
	}else if (ns4){
		document.zoomerns.document.zoomerns_sub.document.write(comments);
		document.zoomerns.document.zoomerns_sub.document.close()
	}

	function zoom(how){
		var arr_to_zoom=new Array("texto");//Aqui você irá colocar a id onde deve ser alterada a letra!
		if ((index<=20)&&(how==1)) index++
		if ((index>8)&&(how==0)) index--
		document.getElementById("percent").value=1*(index*10+0)+"%"
		if (DOM2){
			//alert("DOM2");
			for (i=0;i<arr_to_zoom.length ;i++ ){
				try{
					document.getElementById(arr_to_zoom[i]).style.fontSize=index*10+1+"%";
				}catch(e){
				}
			}
		}else if (ie4){
			//alert("IE4");
			for (i=0;i<arr_to_zoom.length() ;i++ ){
				document.getElementById(arr_to_zoom[i]).style.fontSize=index*10+1+"%";
			}
			document.all.zoomer.style.fontSize=index*10+0+"%";
		}else if (ns4){
			//alert("ns4");
			document.zoomerns.document.zoomerns_sub.document.write(comments);
			document.zoomerns.document.zoomerns_sub.document.close();
		}
	}
//-->

/* ****************************************************** */
// Função que imprime a data na capa
/* ****************************************************** */
function DataHora(texto){
  var dataHora,xHora,xdia,dia,xMinuto,xSegundo,mes,ano,txtsaudacao;
  dataHora=new Date();
  xHora=dataHora.getHours();
  dataHora = new Date();
  xDia = dataHora.getDay();
  dsem = new Array(7);
  dsem[0] = "Domingo";
  dsem[1] = "Segunda-feira";
  dsem[2] = "Terça-feira";
  dsem[3] = "Quarta-feira";
  dsem[4] = "Quinta-feira";
  dsem[5] = "Sexta-feira";
  dsem[6] = "Sábado";
  if (dia < 10) {dia = "0" + dia}
  dia = dataHora.getDate();
  mes = dataHora.getMonth();
  dmes = new Array(12);
  dmes[0] = "Janeiro";
  dmes[1] = "Fevereiro";
  dmes[2] = "Março";
  dmes[3] = "Abril";
  dmes[4] = "Maio";
  dmes[5] = "Junho";
  dmes[6] = "Julho";
  dmes[7] = "Agosto";
  dmes[8] = "Setembro";
  dmes[9] = "Outubro";
  dmes[10] = "Novembro";
  dmes[11]="Dezembro";
  ano = dataHora.getFullYear();
  return("&nbsp;&nbsp;Dionísio Cerqueira, " + dia + " de " + dmes[mes] + " de " + ano + "");
}

/* ****************************************************** */
// Função que verifica campos form
/* ****************************************************** */
function enviardados(){

if(document.comente.nome.value=="")
{
alert( "Preencha campo Nome corretamente!" );
document.comente.nome.focus();
return false;
}

if( document.comente.email.value=="" || document.comente.email.value.indexOf('@')==-1 || document.comente.email.value.indexOf('.')==-1 )
{
alert( "Preencha campo E-MAIL corretamente!" );
document.comente.email.focus();
return false;
}

if(document.comente.comentario.value=="" || document.comente.comentario.value.length < 10)
{
alert( "Preencha campo comentário corretamente!" );
document.comente.comentario.focus();
return false;
}
return true;
}


/* ****************************************************** */
// Função pop-up que se ajusta com o tamanho da imagem
/* ****************************************************** */
function Cadastro(url)
{
 window.open(url,"Newsletter","WIDTH=500,HEIGHT=300,SCROLLBARS=no");
}
defaultTitle='Portal Tri.com.br';
opcoes='status=0,menubar=0,directories=0,toolbar=0,resizable=0';
errorMsg='Erro no carregamento da imagem!<br />A janela será fechada!';
errorAlert='Erro no carregamento da imagem!\nClique em OK para fechar a janela';
limiteW=800;
limiteH=600;
var ie4=typeof(document.all)?1:0,ie5=typeof(document.getElementById)?1:0,ns4=typeof(document.layers)?1:0;
function retobj(nome, alvo)
{
 if (arguments.length > 1)
 {
  alvo=alvo+'.';
 }
 else
 {
  alvo="";
 }
 if (ie4)
 {
  return eval(alvo +"document.all."+ nome);
 }
 else
 if (ie5)
 {
  return eval(alvo +"document.getElementById('"+ nome +"'");
 }
 else
 if (ns4)
 {
  return eval(alvo +"document."+ nome);
 }
 else
 {
  return false;
 }
}
function troyan_resizeBodyTo(newBodyW,newBodyH,alvo)
{
 if (arguments.length == 3)
 {
  alvo=eval(alvo);
 }
 else
 {
  alvo=self;
 }
 var bodyW,bodyH,difW,difH,winW,winH,newBodyW=Number(newBodyW),newBodyH=Number(newBodyH),startW=777,startH=600;
 alvo.resizeTo(startW,startH);
 with(alvo.document.body)
 {
  bodyW=clientWidth; bodyH=clientHeight;
 }
 difW=startW-bodyW;
 difH=startH-bodyH;
 winW=newBodyW+difW;
 winH=newBodyH+difH;
 alvo.resizeTo(winW,winH);
}
function troyan_popupFitToImage(imgToFit, popTitle, disableLimit)
{
 limitarTamanho=(arguments.length < 2 || !disableLimit)?1:0;
 if (!popTitle)
 {
  popTitle=defaultTitle;
 }
 popupFitToImage=window.open('about:blank','_blank',opcoes +',scrollbars=0,location=0,width=100,height=200 top=0 left=0');
 popupFitToImage.document.write(''+
                                 '<html><head><title>'+ popTitle +'</title><style>body{margin:0;}img{display:block;}</style></head>'+
                                 '<body><div id="loading" style="position: relative; top: 40px; width: 50%; height: 100px; '+
                                 'text-align: center; font: 10px verdana; color: darkblue;">Carregando imagem, por favor aguarde...</div>'+
                                 '<a onclick=window.close();><img name="troyan_imgFit" border="0" alt="Clique para fechar [X]" /></a></body></html>'+
                                '');
 objImgToFit=popupFitToImage.document.images['troyan_imgFit'];
 objImgToFit.onload=function()
 {
  retobj('loading','popupFitToImage').style.display='none';
  imgW=objImgToFit.width; imgH=objImgToFit.height;
  if (limitarTamanho && (imgW>limiteW || imgH>limiteH))
  {
   targProporcao=Number(limiteW)/Number(limiteH);
   atualProporcao=Number(imgW)/Number(imgH);
   fatorMultiply=(atualProporcao < targProporcao)?(Number(limiteH)/Number(imgH)):(Number(limiteW)/Number(imgW));
   objImgToFit.width=Number(imgW) * fatorMultiply;
   objImgToFit.height=Number(imgH) * fatorMultiply;
  }
  troyan_resizeBodyTo(objImgToFit.width, objImgToFit.height, 'popupFitToImage');
 }
 objImgToFit.onerror=function()
 {
  retobj('loading','popupFitToImage').innerHTML=errorMsg; popupFitToImage.alert(errorAlert); popupFitToImage.close();
 }
 objImgToFit.src=imgToFit;
 return popupFitToImage;
}

/* ****************************************************** */
// Função do banner que aumenta quando passa o mouse
/* ****************************************************** */

function shExpand(n)
{
 b = document.getElementById(n);
 (b.style.display == '')?(b.style.display = 'none'):(b.style.display = '');
}