
// Se o navegador não for ie6, substitiu as fontes -------------------
function detectBrowser(){
	var b_version=navigator.appVersion;
	if (b_version!="4.0 (compatible; MSIE 6.0; Windows NT 5.1)") {
		FLIR.init();
		FLIR.auto(['h1']);
	}
}
//---------------------------------------------------------------------

// SELEÇÃO DE MENU ------------------
function setActiveTab(tabID) {
	var currTabElem = document.getElementById(tabID);
	currTabElem.setAttribute("class", "atual");
	currTabElem.setAttribute("className", "atual");
	return;
}
//-----------------------------------


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='';
}
	
function Mostrar(alvo){
	alvo1='Mensagem';
	document.getElementById(alvo).style.display='block';
//	alert (alvo2);
}
function Esconder(alvo){
	alvo1='Mensagem';
	document.getElementById(alvo).style.display='none';
//	alert (alvo2);
}

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



// CSS Selector --------------------------------------
/*
CSS Browser Selector v0.2.7
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
*/
var css_browser_selector = function() {var ua=navigator.userAgent.toLowerCase(),is=function(t){return ua.indexOf(t) != -1;},h=document.getElementsByTagName('html')[0],b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?'gecko ff2':is('firefox/3')?'gecko ff3':is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js'; h.className += h.className?' '+c:c;}();

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




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


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.');
            }
        }

    }

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



// Correctly handle PNG transparency in Win IE 5.5 or higher.
// http://homepage.ntlworld.com/bobosola. Updated 02-March-2004

function correctPNG() 
   {
   for(var i=0; i<document.images.length; i++)
      {
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase()
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	     {
		 var imgID = (img.id) ? "id='" + img.id + "' " : ""
		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		 var imgStyle = "display:inline-block;" + img.style.cssText 
		 if (img.align == "left") imgStyle = "float:left;" + imgStyle
		 if (img.align == "right") imgStyle = "float:right;" + imgStyle
		 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
		 var strNewHTML = "<span " + imgID + imgClass + imgTitle
		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
	     + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
		 img.outerHTML = strNewHTML
		 i = i-1
	     }
      }
   }
window.attachEvent("onload", correctPNG);

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

function msn(url){
	var janela = null
	janela=window.open(url,'Chat','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=300,height=300');
}



