/****************************************************************************
* Flash Tag Write Object v1.8 - by Lucas Fererira - www.lucasferreira.com   *
* Info and Usage: www.lucasferreira.com/flashtag                            *
* bugs/reports: contato@lucasferreira.com                                   *
****************************************************************************/

if(Browser == undefined)
{
	var Browser = {
		isIE: function(){ return (window.ActiveXObject && document.all && navigator.userAgent.toLowerCase().indexOf("msie") > -1  && navigator.userAgent.toLowerCase().indexOf("opera") == -1) ? true : false; }
	};
}

var Flash = function(movie, id, width, height, initParams)
{
	this.html = "";
	
	this.variables = new Array();
	
	this.flashversion = (typeof initParams != "undefined" && typeof initParams.flashversion != "undefined") ? initParams.flashversion : "7,0,0,0";
	
	this.attributes = {
		"classid": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
		"codebase": "http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=" + this.flashversion,
		"type": "application/x-shockwave-flash"
	};
	
	this.params = { "pluginurl": "http://www.macromedia.com/go/getflashplayer" };
	
	if(movie)
	{
		this.addAttribute("data", movie);
		this.addParameter("movie", movie);
	}
	
	if(id && id != null && (this.id = id)) 
	{
		this.addAttribute("id", this.id);
		this.addAttribute("name", this.id);
	}
	else
	{
		this.id = null;
	}
	
	if(width) this.addAttribute("width", width);
	if(height) this.addAttribute("height", height);
	
	if(initParams != undefined)
	{
		for(var i in initParams) this.addParameter(i.toString(), initParams[i]);
	}
};
Flash.version = "v1.8";

Flash.prototype.getObject = function()
{
	if(this.id == null) return null;
	try
	{
		if(window.document[this.id])
		{
			return window.document[this.id];
		}
		else
		{
			return document.getElementById(window.document[this.id]);
		}
	}
	catch(e) { return null; }
};

Flash.getObjectByExceptions = function(obj, excep)
{
	var tempObj = {};
	for(var i in obj)
	{
		var EOF = false;
		for(var j=0; j<excep.length; j++) if(excep[j] == i.toString()) { EOF = true; break; };
		if(!EOF) tempObj[i] = obj[i];
	}
	return tempObj;
};

Flash.prototype.addAttribute = function(prop, val){ this.attributes[prop] = val; };
Flash.prototype.addParameter = function(prop, val){ this.params[prop] = val; };
Flash.prototype.addVariable = function(prop, val){ this.variables.push([prop, val]); };

Flash.prototype.getFlashVars = function()
{
	for(var i=0, tempString = new Array(); i<this.variables.length; i++) tempString.push(this.variables[i].join("="));
	return tempString.join("&");
};
Flash.prototype.toString = function()
{
	this.params.flashVars = this.getFlashVars();
	if(Browser.isIE())
	{
		//IE
		this.html = "<ob" + "ject";
		var attr = Flash.getObjectByExceptions(this.attributes, ["type", "data"]);
		for(var i in attr) if(i.toString() != "extend") this.html += " " + i.toString() + " = \"" + attr[i] + "\"";
		this.html += "> ";
		var params = Flash.getObjectByExceptions(this.params, ["pluginurl", "extend"]);
		for(var i in params) if(i.toString() != "extend") this.html += "<param name=\"" + i.toString() + "\" value=\"" + params[i] + "\" /> ";
		this.html += " </obj" + "ect>";
	}
	else
	{
		//non-IE
		this.html = "<!--[if !IE]> <--> <obj" + "ect";
		var attr = Flash.getObjectByExceptions(this.attributes, ["classid", "codebase"]);
		for(var i in attr) if(i.toString() != "extend") this.html += " " + i.toString() + " = \"" + attr[i] + "\"";
		this.html += "> ";
		var params = Flash.getObjectByExceptions(this.params, ["extend"]);
		for(var i in params) if(i.toString() != "extend") this.html += "<param name=\"" + i.toString() + "\" value=\"" + params[i] + "\" /> ";
		this.html += " </obj" + "ect> <!--> <![endif]-->";
	}
	return this.html;
};
Flash.prototype.write = Flash.prototype.writeIn = function(w)
{
	if(typeof w == "string" && (w = document.getElementById(w)));
	if( w != null ) { w.innerHTML = this.toString(); }
	else if( w == undefined ) { document.write( this.toString() ); }
    	else { return false; }
};

//automatization functions...
Flash.correctAll = function()
{
	if(!/msie/.test(navigator.userAgent.toLowerCase()) || !document.getElementsByTagName) return false;
	for (var i = 0, objects = document.getElementsByTagName("OBJECT"); i < objects.length;
		(objects[i].outerHTML ? (objects[i].outerHTML = objects[i].outerHTML, objects[i].style.visibility = "visible") : null), i++);
};
Flash.automatic = function(r)
{
	if(r && window.attachEvent)
	{	
		for (var i = 0, objects = document.getElementsByTagName("OBJECT"); i < objects.length; (objects[i].style.visibility = "hidden"), i++);
		window.attachEvent("onload", Flash.correctAll);
		window.attachEvent("onunload", function(){ window.detachEvent("onload", Flash.correctAll); });
	}
	else
	{
		Flash.correctAll();
	}
};
// JavaScript Document
function openPictureWindow_Fever(imageName,imageWidth,imageHeight,alt,posLeft,posTop) {
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	newWindow.document.write('<img src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt='+alt+'>'); 
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}
// Relogio
var alternate=0
var standardbrowser=!document.all&&!document.getElementById

if (standardbrowser)
document.write('<form name="tick"><input type="text" name="tock" size="6"></form>')

function show(){
if (!standardbrowser)
var clockobj=document.getElementById? document.getElementById("digitalclock") : document.all.digitalclock
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()

if (hours.toString().length==1)
hours="0"+hours
if (minutes<=9)
minutes="0"+minutes

if (standardbrowser){
if (alternate==0)
document.tick.tock.value=hours+":"+minutes+" "//+dn
else
document.tick.tock.value=hours+" "+minutes+" "//+dn
}
else{
if (alternate==0)
clockobj.innerHTML=hours+"<span style='color:#fff;'>:</span>"+minutes+" "//+"<sup style='font-size:1px'>"+dn+"</sup>"
else
clockobj.innerHTML=hours+"<span style='color:#000;'>:</span>"+minutes+" "//+"<sup style='font-size:1px'>"+dn+"</sup>"
}
alternate=(alternate==0)? 1 : 0
setTimeout("show()",1000)
}
window.onload=show

function diaSemana(){
mydate = new Date();
myday = mydate.getDay();
mymonth = mydate.getMonth();
myweekday= mydate.getDate();
myyear = mydate.getYear();
weekday= myweekday;

if(myday == 0)
day = " Domingo, "

else if(myday == 1)
day = " Segunda - Feira, "

else if(myday == 2)
day = " Ter&ccedil;a - Feira, "

else if(myday == 3)
day = " Quarta - Feira, "

else if(myday == 4)
day = " Quinta - Feira, "

else if(myday == 5)
day = " Sexta - Feira, "

else if(myday == 6)
day = " S&aacute;bado, "

if(mymonth == 0)
month = "Janeiro "

else if(mymonth ==1)
month = "Fevereiro "

else if(mymonth ==2)
month = "Mar&ccedil;o "

else if(mymonth ==3)
month = "Abril "

else if(mymonth ==4)
month = "Maio "

else if(mymonth ==5)
month = "Junho "

else if(mymonth ==6)
month = "Julho "

else if(mymonth ==7)
month = "Agosto "

else if(mymonth ==8)
month = "Setembro "

else if(mymonth ==9)
month = "Outubro "

else if(mymonth ==10)
month = "Novembro "

else if(mymonth ==11)
month = "Dezembro "

if((navigator.product != null)||(navigator.userAgent.indexOf('Opera') > -1)){
myyear = myyear + 1900;
}

document.write(day + myweekday +" de "+ month +" de "+ myyear + " - ");	
}