//Verifica o canal 
var theURL = new String (document.location) ;

theURL = theURL + "chk" ;

var bEx = false ;
var keyBC;

/*
if (theURL.indexOf('pedagio') > -1 ) {
	  var ABR_page    = PrsStr(lc["pedagio"],0) ;
	  var ABR_pos = PrsStr(lc["pedagio"],1) ;
     bEx = true; 
}

if (theURL.indexOf('copa2006') > -1 ) {
	  var ABR_page    = PrsStr(lc["copa2006"],0) ;
	  var ABR_pos = PrsStr(lc["copa2006"],1) ;
     bEx = true; 
}
*/

/*Rotina anterior*/
if (typeof le != 'undefined') 
	for (i=0;i<le.length;i++)  
	if (theURL.indexOf( PrsStr(le[i],0) ) > -1 ) {
      var ABR_page    = PrsStr(le[i],1) ;
      var ABR_pos = PrsStr(le[i],2) ;
	 bEx = true ;
	}


    if (!bEx) {
        var auxPath = theURL.split("/") ;
        auxPath.splice(0,3);
        auxPath.pop();
        if(keyBC != ''){  //quando for landing page
			if(keyBC == auxPath[auxPath.length-1]) auxPath.pop();
		}
        
        
        if(typeof ABR_page2 != 'undefined' && ABR_page2 == "naoencontrada") {
            var ABR_page    = PrsStr(lc["naoencontrada"],0) ;
            var ABR_pos = PrsStr(lc["naoencontrada"],1) ;
        }
        else {
            if (auxPath.length>0){
                if (lc[auxPath]!=null) {
                    var ABR_page    = PrsStr(lc[auxPath],0) ;
                    var ABR_pos = PrsStr(lc[auxPath],1) ;
                } 
                else {
                    var ABR_page    = PrsStr(lc["internas"],0) ;
                    var ABR_pos = PrsStr(lc["internas"],1) ;
                    }
                } 
                else 
                {
                    var ABR_page    = PrsStr(lc["home"],0) ;
                    var ABR_pos = PrsStr(lc["home"],1) ;
                }
                /* var isX03  = (ABR_pos.indexOf('x03') > -1) ? 1 : -1 ;
                var isX02  = (ABR_pos.indexOf('x02') > -1) ? 1 : -1 ;*/
        }
    }
    
    

function PrsStr(ct,id) {
  var str=ct.split('|');
  return str[id] ;
}
