
function Proximo(idAlvo){
	valorAlvo = idAlvo + 1;
	alvo1 = 'setas'+idAlvo;
	alvo2 = 'setas'+valorAlvo;
	document.getElementById(alvo1).style.display='none';
	document.getElementById(alvo2).style.display='';
//	alert (alvo2);
}
function Anterior(idAlvo){
	valorAlvo = idAlvo - 1;
	alvo1 = 'setas'+idAlvo;
	alvo2 = 'setas'+valorAlvo;
	document.getElementById(alvo1).style.display='none';
	document.getElementById(alvo2).style.display='';
}
	

// Pop-up Dreamweaver ---------------------------------
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-----------------------------------------------------



// CSS Selector --------------------------------------
/*
CSS Browser Selector v0.4.0 (Nov 02, 2010)
Rafael Lima (http://rafael.adm.br)
http://rafael.adm.br/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Contributors: http://rafael.adm.br/css_browser_selector#contributors
*/
function css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1},g='gecko',w='webkit',s='safari',o='opera',m='mobile',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3.6')?g+' ff3 ff3_6':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('blackberry')?m+' blackberry':is('android')?m+' android':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?m+' j2me':is('iphone')?m+' iphone':is('ipod')?m+' ipod':is('ipad')?m+' ipad':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win'+(is('windows nt 6.0')?' vista':''):is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);
//-----------------------------------------------------




// AJAX básico ---------------


function exReposicao() {
	//Não faz nada
	}

function Reposicao(url) {
        var httpRequest;

        if (window.XMLHttpRequest) { // Mozilla, Safari, ...
            httpRequest = new XMLHttpRequest();
            if (httpRequest.overrideMimeType) {
                httpRequest.overrideMimeType('text/xml');
                // See note below about this line
            }
        } 
        else if (window.ActiveXObject) { // IE
            try {
                httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
                } 
                catch (e) {
                           try {
                                httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
                               } 
                             catch (e) {}
                          }
                                       }

        if (!httpRequest) {
            alert('Giving up :( Cannot create an XMLHTTP instance');
            return false;
        }
        httpRequest.onreadystatechange = function() { Escrever(httpRequest); };
        httpRequest.open('GET', url, true);
        httpRequest.send('');

    }

    function Escrever(httpRequest) {

        if (httpRequest.readyState == 4) {
            if (httpRequest.status == 200) {
                document.getElementById('ConteudoAjax').innerHTML =	httpRequest.responseText;
            } else {
                alert('There was a problem with the request.');
            }
        }

    }

//-----------------------------------------------------


function Reposicao2(url,varLink) {
	for(num=1; num<=6; num++){
		alvo = 'link'+num;
		document.getElementById(alvo).style.fontWeight = 'normal';
	}
	idLink = 'link'+varLink;
	document.getElementById(idLink).style.fontWeight = 'bold';
	
				 
        var httpRequest;

        if (window.XMLHttpRequest) { // Mozilla, Safari, ...
            httpRequest = new XMLHttpRequest();
            if (httpRequest.overrideMimeType) {
                httpRequest.overrideMimeType('text/xml');
                // See note below about this line
            }
        } 
        else if (window.ActiveXObject) { // IE
            try {
                httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
                } 
                catch (e) {
                           try {
                                httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
                               } 
                             catch (e) {}
                          }
                                       }

        if (!httpRequest) {
            alert('Giving up :( Cannot create an XMLHTTP instance');
            return false;
        }
        httpRequest.onreadystatechange = function() { Escrever2(httpRequest); };
        httpRequest.open('GET', url, true);
        httpRequest.send('');

    }

    function Escrever2(httpRequest) {

        if (httpRequest.readyState == 4) {
            if (httpRequest.status == 200) {
                document.getElementById('ConteudoAjax2').innerHTML =	httpRequest.responseText;
            } else {
                alert('There was a problem with the request.');
            }
        }

    }

//-----------------------------------------------------



function linkFull(endereco){
	w=1014
	h=738
	if (window.screen) {
		w = window.screen.availWidth - 10;
		h = window.screen.availHeight - 30;
	}
	window.open(endereco,'newwin','width='+w+',height='+h+',top=0,left=0');
};


function telasTarifas(totalItens,idTela){

	for(i=1; i<= totalItens; i++){
		alvoApagar = 'tela'+i;
		document.getElementById(alvoApagar).style.display='none';
		linkOff = 'link'+i;
		document.getElementById(linkOff).style.fontWeight = '';
		document.getElementById(linkOff).style.backgroundColor='';
	}
	telaAtiva = 'tela'+idTela;
	document.getElementById(telaAtiva).style.display='';	
	linkAtivo = 'link'+idTela;
	document.getElementById(linkAtivo).style.fontWeight = 'bold';
	document.getElementById(linkAtivo).style.backgroundColor='#352821';
};


