var _f_msg1 = "Plug-In Adobe Flash Player";
var _f_msg2 = "Este website necessita do Plug-In Adobe Flash Player. Para que sua experiência seja completa, recomendamos que você instale este plug-in em seu navegador.";
var _f_msg3 = "Clique no link abaixo para ir à página de download:";
var _f_msg4 = "Ao fechar esta janela, você reconhece que a sua experiência neste site pode ser degradada.";
var _f_msg5 = "Fechar esta Janela";
var _f_br1 = "Adobe Flash Player";
var _f_url1 = "http://get.adobe.com/br/flashplayer/";
var _f_imgPath;

function flashDetection(){
	//alert("Eu sei que teu navegador já tem flash, mas...");
	if(jQuery.browser.flash != true){
		flashWarning("../includes/flash-warning/");
	}
}

function flashWarning(str) {
_f_imgPath = str;

var _f_body = document.getElementsByTagName('body')[0];

var _f_d = document.createElement('div');
var _f_l = document.createElement('div');
var _f_h = document.createElement('h1');
var _f_p1 = document.createElement('p');
var _f_p2 = document.createElement('p');
var _f_ul = document.createElement('ul');
var _f_li1 = document.createElement('li');
var _f_ico1 = document.createElement('div');
var _f_lit1 = document.createElement('div');

var _f_close = document.createElement('div');
var _f_closel = document.createElement('a');

_f_body.appendChild(_f_l);
_f_body.appendChild(_f_d);
_f_d.appendChild(_f_h);
_f_d.appendChild(_f_p1);
_f_d.appendChild(_f_p2);
_f_d.appendChild(_f_ul);

_f_d.appendChild(_f_close);
_f_close.appendChild(_f_closel);

_f_ul.appendChild(_f_li1);
_f_li1.appendChild(_f_ico1);
_f_li1.appendChild(_f_lit1);

_f_d.setAttribute('id','_f_d');
_f_l.setAttribute('id','_f_l');
_f_h.setAttribute('id','_f_h');
_f_p1.setAttribute('id','_f_p1');
_f_p2.setAttribute('id','_f_p2');
_f_ul.setAttribute('id','_f_ul');
_f_li1.setAttribute('id','_f_li1');
_f_ico1.setAttribute('id','_f_ico1');
_f_lit1.setAttribute('id','_f_lit1');

_f_close.setAttribute('id','_f_close');
_f_closel.setAttribute('id','_f_closel');
_f_closel.setAttribute('href','#');

var _f_width = document.documentElement.clientWidth;
var _f_height = document.documentElement.clientHeight;

var _f_dl = document.getElementById('_f_l');
_f_dl.style.width =  _f_width+"px";
_f_dl.style.height = _f_height+"px";
_f_dl.style.position = "absolute";
_f_dl.style.top = "0px";
_f_dl.style.left = "0px";
_f_dl.style.filter = "alpha(opacity=50)";
_f_dl.style.background = "#000";
_f_dl.style.opacity = "0.5";

var _f_dd = document.getElementById('_f_d');
_f_ddw = 300;
_f_ddh = 300;
_f_dd.style.width = _f_ddw+"px";
_f_dd.style.height = _f_ddh+"px";
_f_dd.style.position = "absolute";
_f_dd.style.top = ((_f_height-_f_ddh)/2)+"px";
_f_dd.style.left = ((_f_width-_f_ddw)/2)+"px";
_f_dd.style.padding = "20px";
_f_dd.style.background = "#fff";
_f_dd.style.border = "1px solid #ccc";
_f_dd.style.fontFamily = "Arial,'Lucida Grande','Lucida Sans Unicode',Verdana,sans-serif";
_f_dd.style.listStyleType = "none";
_f_dd.style.color = "#4F4F4F";
_f_dd.style.fontSize = "12px";

_f_h.appendChild(document.createTextNode(_f_msg1));
var _f_hd = document.getElementById('_f_h');
_f_hd.style.display = "block";
_f_hd.style.fontSize = "1.3em";
_f_hd.style.marginBottom = "0.5em";
_f_hd.style.color = "#333";
_f_hd.style.fontFamily = "Helvetica,Arial,sans-serif";
_f_hd.style.fontWeight = "bold";

_f_p1.appendChild(document.createTextNode(_f_msg2));
var _f_p1d = document.getElementById('_f_p1');
_f_p1d.style.marginBottom = "1em";

_f_p2.appendChild(document.createTextNode(_f_msg3));
var _f_p2d = document.getElementById('_f_p2');
_f_p2d.style.marginBottom = "1em";

var _f_uld = document.getElementById('_f_ul');
_f_uld.style.listStyleImage = "none";
_f_uld.style.listStylePosition = "outside";
_f_uld.style.listStyleType = "none";
_f_uld.style.margin = "0 px auto";
_f_uld.style.padding = "0px";
_f_uld.style.paddingLeft = "10px";

var _f_li1d = document.getElementById('_f_li1');
var _f_li1ds = _f_li1d.style;
_f_li1ds.background = "transparent url('"+_f_imgPath+"background_browser.gif') no-repeat scroll left top";
_f_li1ds.padding = "1px 0 0";
_f_li1ds.cursor = "pointer";
_f_li1d.onclick = function() { window.open(_f_url1) };

_f_li1ds.width = "120px";
_f_li1ds.height = "122px";
_f_li1ds.margin = "0 auto 10px";

var _f_ico1d = document.getElementById('_f_ico1');
var _f_ico1ds = _f_ico1d.style;
_f_ico1ds.width = "100px";
_f_ico1ds.height = "100px";
_f_ico1ds.margin = "0 auto";
_f_ico1ds.background = "transparent url('"+_f_imgPath+"flashplayer.png') no-repeat scroll left top";

_f_lit1.appendChild(document.createTextNode(_f_br1));
var _f_lit1d = document.getElementById('_f_lit1');
var _f_lit1ds = _f_lit1d.style;
_f_lit1ds.color = "#808080";
_f_lit1ds.fontSize = "0.8em";
_f_lit1ds.height = "18px";
_f_lit1ds.lineHeight = "17px";
_f_lit1ds.margin = "2px auto";
_f_lit1ds.width = "118px";
_f_lit1ds.textAlign = "center";

var _f_closed = document.getElementById('_f_close');
var _f_closeld = document.getElementById('_f_closel');
var _f_closeds = _f_closed.style;
var _f_closelds = _f_closeld.style;

_f_closeds.margin = "0";
_f_closeds.color = "#C00";
_f_closelds.color = "#000";
_f_closelds.display = "block";
_f_closelds.width = "auto";
_f_closelds.width = "auto";


_f_closed.appendChild(document.createTextNode(_f_msg4));
_f_closeld.appendChild(document.createTextNode(_f_msg5));

_f_closeld.onmouseover = function() {
_f_closelds.color = "#C00";
};

_f_closeld.onmouseout = function() {
_f_closelds.background = "transparent";
_f_closelds.color = "#000";
};

_f_closeld.onclick = function() {
_f_l.style.display = "none";
_f_d.style.display = "none";
};

}
