﻿
    //resolucao de browser
//    if (screen.colorDepth == 8){document.contato.cor.value = ("256 cores" );}
//    if (screen.colorDepth == 16){document.contato.cor.value = ("True color " + screen.colorDepth + " bits");}
//    if (screen.colorDepth == 24){document.contato.cor.value = ("True color " + screen.colorDepth + " bits");}
//    if (screen.colorDepth == 32){document.contato.cor.value = ("True color " + screen.colorDepth + " bits");}
//    if (screen.colorDepth == 64){document.contato.cor.value = ("True color " + screen.colorDepth + " bits");}

function browserResolution()
{    
    return screen.width +"x"+ screen.height;
}

function navigatorName()
{
    return navigator.appName +"  "+ navigator.appVersion;
}

function systemPlatform()
{
    return navigator.platform;
}

function isCookieEnable()
{
    //cookies
    document.cookie = "aceita_cookie=1"
	if(document.cookie == "") 
	{
		return false;
	}
	else
	{
		document.cookie = "aceita_cookie=1; expires=Fri, 13-Apr-1970 00:00:00GMT";
		return true;
	}
}

function flashVersion()
{
    var plugin = ( navigator.mimeTypes["application/x-shockwave-flash"]) ? 
              navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

    // plugin = 0 (Internet Explorer)
    // plugin = Objeto Plugin (Netscape)

    if ( plugin ) 
      { 
        // Algum Objeto (Netscape)
	    versao = parseInt(plugin.description.substring(plugin.description.indexOf(".")-1));
	    p = 1;
	    return versao;
	    // plugin = true (Versão >= 5)
	    // plugin = false (Versão < 5)
      }
    else
    {
   // Provavelmente IE 
  if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0))
    {
	  // Certeza que é IE
	  plugin = p9()
	  if (plugin) { return "9"; }
	  plugin = p8()
	  if (plugin) { return "8"; }
	  plugin = p7()
	  if (plugin) { return "7"; }
      plugin = p6()
	  if (plugin) { return "6"; }
	  plugin = p5()
	  if (plugin) { return "5"; }
      plugin = p4()
	  if (plugin) { return "4"; }
      plugin = p3()
	  if (plugin) { return "3"; }
      plugin = p2()
	  if (plugin) { return "2"; }
   }
  }
}

//função que verifica versão do plugin Flash no browser
//fonte: http://www.google-analytics.com/urchin.js
function _uFlash() {
 var f="-",n=navigator;
 if (n.plugins && n.plugins.length) {
  for (var ii=0;ii<n.plugins.length;ii++) {
   if (n.plugins[ii].name.indexOf('Shockwave Flash')!=-1) {
    f=n.plugins[ii].description.split('Shockwave Flash ')[1];
    break;
   }
  }
 } else if (window.ActiveXObject) {
  for (var ii=10;ii>=2;ii--) {
   try {
    var fl=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+ii+"');");
    if (fl) { f=ii + '.0'; break; }
   }
   catch(e) {}
  }
 }
 return f;
}