/*
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;}();




//Flash Solver ---------------------------------------


//Powered by Softery.com
//Ver: 3//
function FlashSolver()
	{
	n=navigator;
	nav=n.appVersion.toLowerCase();
	if ((nav.indexOf('win')!=-1) || (nav.indexOf('nt')!=-1)) 
		{
		if (navigator.appName == "Microsoft Internet Explorer")
			{
			var tmpObject = document.getElementsByTagName('object');
			if (tmpObject && tmpObject.length) 
				{
				for (var i = 0; i < tmpObject.length; i++) 
					{
					if (tmpObject[i].getAttribute('classid').toLowerCase() == 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000') 
						{
						var ps = tmpObject[i].getElementsByTagName('param');
						if (ps && ps != null)
							{
							for (var j = 0; j < ps.length; j++) 
								{
								if (ps[j].getAttribute('name').toLowerCase() == 'flashvars') 
									{
									var variables = ps[j].getAttribute('value');
									break;
									}
								}
							}
						var obj = tmpObject[i].outerHTML + "\n";
						obj = obj.replace(/FLASHVARS" VALUE=""/i,'FLASHVARS" value="'+variables+'"');
						tmpObject[i].outerHTML = obj;
						}
					}
				tmpObject = null;
				}
			}
		}
	}
window.onunload = function()
	{
	n=navigator;
	nav=n.appVersion.toLowerCase();
	if ((nav.indexOf('win')!=-1) || (nav.indexOf('nt')!=-1)) 
		{
		if (navigator.appName == "Microsoft Internet Explorer")
			{
			if (document.getElementsByTagName) 
				{
				var tmpObject = document.getElementsByTagName("object"); 
				for (i=0; i<tmpObject.length; i++)
					{
					tmpObject[i].outerHTML = ""; 
					}
				}
			}
		}
	}
//---------------------------------------------------------



// 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('Conteudo').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 aba_promo(cor, id, id_cont) {
	var divs = ["aba01", "aba02", "aba03", "aba04"];
	document.getElementById(divs[0]).className = "azul";
	document.getElementById(divs[1]).className = "vermelho";
	document.getElementById(divs[2]).className = "verde";
	document.getElementById(divs[3]).className = "laranja";
	document.getElementById(id).className = "atual "+cor;
	
	var divs_cont = ["aba_cont01", "aba_cont02", "aba_cont03", "aba_cont04"];
	document.getElementById(divs_cont[0]).style.display = "none";
	document.getElementById(divs_cont[1]).style.display = "none";
	document.getElementById(divs_cont[2]).style.display = "none";
	document.getElementById(divs_cont[3]).style.display = "none";
	document.getElementById(id_cont).style.display = "block";

}
